Gossamer Forum
Home : General : Databases and SQL :

sql + fail to replace

Quote Reply
sql + fail to replace
Hi,

with the following sql command,

replace("ab cd"," ",'')

or

replace("ab cd",char(32),'')

Result is

"ab cd"

but not "abcd"

what i want the result is "abcd"

i don't know why, pls help & thanks a lot.
Quote Reply
Re: [ssharon] sql + fail to replace In reply to
It works for me:

Code:
mysql> select replace('ab cd', ' ', '');
+---------------------------+
| replace('ab cd', ' ', '') |
+---------------------------+
| abcd |
+---------------------------+
1 row in set (0.00 sec)

mysql>


What do you get?

Cheers,

Alex
--
Gossamer Threads Inc.

Last edited by:

Alex: Oct 21, 2002, 12:08 PM