Quick & Dirty: How to parse a delimited string and get the nth element
I have a comma delimited string:
Now I want to extract the 3rd element (is) from it inside a select statement:
select regexp_substr('Hello,this,is,my,string' , '[^,]+', 1, 3) from dual;
To count the elements in my string I can use:
select regexp_count('Hello,this,is,my,string' , ',', 1, 'i')+1 regexp_count from dual;