I'm trying to write a SQL query that will remove all spaces so that if a string only has spaces the final string is just ''.
I've tried this code but apparently it isn't working for more than one space:
regexp_replace(:P14_search_text, '( ){1,}', '')
Being :P14_search_text the string I want to modify.
Any help?