7 messages in com.mysql.lists.win32Re: Adding a space in CONCAT| From | Sent On | Attachments |
|---|---|---|
| Greg Quinn | 17 Apr 2004 12:39 | |
| Charles Mabbott | 17 Apr 2004 12:42 | |
| Dr. Virginia R. Hetrick | 17 Apr 2004 14:25 | |
| Graeme St.Clair | 18 Apr 2004 11:51 | |
| Graeme St.Clair | 18 Apr 2004 12:07 | |
| rob spijkerman | 18 Apr 2004 13:51 | |
| East Bay Technologies | 18 Apr 2004 15:17 |
| Subject: | Re: Adding a space in CONCAT![]() |
|---|---|
| From: | rob spijkerman (rob....@alliedtelesyn.co.nz) |
| Date: | 04/18/2004 01:51:38 PM |
| List: | com.mysql.lists.win32 |
If you are looking for a space then use CONCAT_WS.
like this: select CONCAT_WS(' ',fisrtsname,lastname) as name
That will put a space between the two variables.
Cheers..
Rob
------------------------------------------------------------------------------------------------------------------------ Rob Spijkerman 27 Nazareth Avenue Senior Intranet Developer PO Box 8011 Allied Telesyn Research Christchurch Phone +64 3 339 3000 New Zealand DDI +64 3 339 9682 Email: rob....@alliedtelesyn.co.nz Fax +64 3 339 3001 web: http://www.alliedtelesyn.co.nz/
------------------------------------------------------------------------------------------------------------------------
"Graeme St.Clair" <grae...@charter.net> 19/04/2004 7:07:42
a.m. >>> Brain lock. Please ignore my last post - like the little lad in the AFLAC ad (apols to non-USA readers), I was not "paying attention".
But are you by any chance getting error 1269 or 1270? If so, you probably need to cast the string ' ' to some other character set e.g. select concat(FileName, _utf8 ' ', FileSize) from blah where blah;
Rgds, G.
----- Original Message ----- From: Greg Quinn To: win...@lists.mysql.com Sent: Saturday, April 17, 2004 3:39 PM Subject: Adding a space in CONCAT
I am trying to add a space between two values in my CONCAT statement but nothing works...
I have tried
Select CONCAT(FileName, ' ', FileSize)
and
Select CONCAT(FileName, Char(32), FileSize)
But neither puts a space in between...
how do I do this?
Thanks Greg
------------------------------------------------------------------------------
-- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/win32?unsub=grae...@charter.net
NOTICE: This message contains privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify Allied Telesyn Research Ltd immediately. Any views expressed in this message are those of the individual sender, except where the sender has the authority to issue and specifically states them to be the views of Allied Telesyn Research.




