I have a text APPLE 23 under a field Fruits. I would like to remove the spaces and get a text as APPLE23. How to i do that in postgres?
-Thanks in advance.
I have a text APPLE 23 under a field Fruits. I would like to remove the spaces and get a text as APPLE23. How to i do that in postgres?
-Thanks in advance.
try this:
replace(mystring,' ','') to get rid of spaces in the string.
To replace characters (as opposed to whole strings), translate()
is even faster:
SELECT translate (mystring, ' ', '')