remove specific spaces in a string in pl/sql
846465Mar 10 2011 — edited Mar 10 2011Hello,
I need to remove only the specific spaces in a string for eg only spaces before and after '&' as shown below.
We should keep the spaces at other parts of the string, however the white space befire and after & should be removed.
'state=new york & name=ab aff & ref=new' -> 'state=new york+name=ab aff+ref=new'
How we can do in pl/sql in a efficient way? can REGEXP_REPLACE be used? I amnot sure how it can be done in most efficient way.
I can probably use the substr and instr.
Thanks a lot
TJ