I'm trying to split a comma separated list in a column to different rows. For example:
with testdata(vala,valb,valc) as(
select
'1,2,3,4' as vala,
'5,6,7,8' as valb,
'9,10,11' as valc
from dual)
Using the table above I'm trying to get the values in such a form that vala,valb and valc are the columns, the different comma separated values are the rows. As shown in the image below:
I already had a look into https://lalitkumarb.wordpress.com/2014/12/02/split-comma-delimited-string-into-rows-in-oracle/ and https://blogs.oracle.com/aramamoo/how-to-split-comma-separated-string-and-pass-to-in-clause-of-select-statement but I seem to be unable to apply the methods described as I have more columns...
The reason why I need to do this transformation is to use these values in a IN expression further down the query.