Reputation: 1
I want to extract the number(0-9) from the string. e.g.
*J$456*&56
then tgt should be 45656
&*(>123>>789&^
then tgt should be 123789
This is just an example, special characters or alphabets are random in string, so how to extract only numbers?
Thanks is advance.
Regards sheetal
Upvotes: 0
Views: 11647
Reputation: 3353
You'd need to replace all other characters with an empty string. Try
REG_REPLACE(COLUMN_NAME, '[^0-9]', '')
Upvotes: 4