lmymusic2000
asked on
How to trim in between blank spaces of a character string in Oracle
Hi All,
I would like your idea and input on how to trim the blank spaces in between a character string in Oracle. For example I have this character strings as 'I go to sleep' how can I make it to become 'Igotosleep'. I try the trim function but it does not work.
I would like your idea and input on how to trim the blank spaces in between a character string in Oracle. For example I have this character strings as 'I go to sleep' how can I make it to become 'Igotosleep'. I try the trim function but it does not work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
replace(yourstring,' ')
try this: select replace('THIS IS a test.', ' ', NULL) from dual;
SELECT REPLACE("Your String", CHR(32), '') FROM DUAL will replace any blank spaces in the given string
Why make an additional function call when it is not needed?
ASKER
You nail it, slightwv. Thanks