0

I have a column with the string "ItemBO:M101,1000129A,A" I want to extract only the text "1000129A"

Many thanks in advance!

I tried using the function

SELECT SUBSTR_AFTER ('ItemBO:M101,1000129A,A',',') "substr after" FROM DUMMY;

but the result is 1000129A,A

Jonas Wilms
  • 132,000
  • 20
  • 149
  • 151
charj
  • 1

1 Answers1

0

Solved using

SELECT SUBSTRING_REGEXPR('[^,]+' IN 'ItemBO:M101,1000129A,A' FROM 1 OCCURRENCE 2) FROM DUMMY;
Jonas Wilms
  • 132,000
  • 20
  • 149
  • 151
charj
  • 1