Lets say I have a 2 column table, in 1st col. is an account number and in the 2nd personal client ID BUT in a long string. In that string may be few different clients IDs and each begins with "ID"
|account_no | note
|12345 | AAAAID1111BBBBID2222CCACAID3333JDBSTGDid4444
How can I receive such result each in single row?:
account_no|ID
12345 1111
12345 2222
...
1234 4444
using regexp_substr(upper(note), 'ID[[:digit:]]{4}')
it returns me only first ID from the whole string.
Any loop or is there any trick with regexps?