I'm trying to produce the following output
col1 col2
aaa qq
bbb ww
ccc ee
As you can see from my attempt I have hardcoded VALUES, which only produces one row.
I'm looking to get a count from both columns and iterate through the data. If the counts aren't the same for both columns then I want to use a NULL where the count is less and match it with a value.
Below is my simple attempt that is incomplete. Any help would be greatly appreciated.
select regexp_substr('aaa,bbb,ccc', '[^,]+', 1, 1) as col1,
regexp_substr('qq, ww, ee', '[^,]+', 1, 1) as col2 from dual