Sunday, February 3, 2008

How to trim the spaces between the words in oracle

Ex : the word is 'HAI HELLO'
The o/p should be 'HAI HELLO'

SQL> SELECT REGEXP_REPLACE('hai hello', '[[:blank:]]+', ' ') FROM dual;

REGEXP_RE
--------------
hai hello

No comments: