HI ALL,
We need to retrieve the values from the CSV file
E.g MIch,Lname,"Cat,rat",XXX,,YYY
Able get all values with comma delimited using REGEXP_SUBSTR.
But in the output we are getting only not null records as below
Query:
select level,REGEXP_SUBSTR('MIch,Lname,"Cat,rat",XXX,,YYY', '("[^"]*"|[^,]+)', 1, level) split
from dual
connect by level <= length (regexp_replace ('MIch,Lname,"Cat,rat",XXX,,YYY', '("[^"]*"|[^,]+)')) + 1;
Now getting output as
MIch
Lname
"Cat,rat"
XXX
YYY
Excepted output
MIch
Lname
"Cat,rat",
XXX
null --> Since not values need to show the records in correct position as in CSV file.
YYY
Please Some one assist us to get expected output