Link to home
Start Free TrialLog in
Avatar of Steve Berger
Steve BergerFlag for United States of America

asked on

Fetch only Numeric Value from the String?

Hi,

I have the string like "D1-A-JOIN". Here i have to only fetch the numeric value which is present in the string.

In the above string the SQL should only return 1.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sean Stuber
Sean Stuber

if you might have multiple numeric values and you want them all...

regexp_replace(yourstring,'[^0-9]')



for example D1-A2-JOIN3

123