Skip to content Skip to sidebar Skip to footer

How To Remove Non-numeric Characters (except Full Stop "." ) From A String In Amazon Redshift

I have been trying to figure out how to remove multiple non-numeric characters except full stop ('.'), or return only the numeric characters with full stop ('.') from a string. I'

Solution 1:

Please try this:

The below regex_replace expression will replace all character which are not ("^") in the (range of 0-9) & "."

SELECT regexp_replace('ABC$$$%%11633123.60','([^0-9.])','') FROM DUAL;

It returns the expected output "11633123.60"

Post a Comment for "How To Remove Non-numeric Characters (except Full Stop "." ) From A String In Amazon Redshift"