Extract data from rows using SQL

Database

Extract data from rows using SQL

Hi everyone first time here hope someone could help me, I need a SEL statment from speciefied column to only show speciefied text with number, example below: 

 

 

ID (column name)
================= ID1 ID2 ID3 IDabc abcID abcID123

 

 

The output should be only ID part that also has a number next to it, result i should get is:

 

ID1
ID2
ID3
ID123

 

 

 

 


Accepted Solutions
Junior Contributor

Re: Extract data from rows using SQL

This Regular Expression returns 'ID' followed by any number of digits:

RegExp_Substr(ID, 'ID\d')
1 ACCEPTED SOLUTION
3 REPLIES
Junior Contributor

Re: Extract data from rows using SQL

This Regular Expression returns 'ID' followed by any number of digits:

RegExp_Substr(ID, 'ID\d')

Re: Extract data from rows using SQL

Thank you that worked i've only added + after d to get leading numbers

Junior Contributor

Re: Extract data from rows using SQL

Yes, of course, I forgot the '+'.