select a.*, b.id from
(
select * from (
select regexp_substr('TC,HBO,FUT','[^,]+',1,level) element, level as lvl
from dual connect by level <= length(regexp_replace('TC,HBO,FUT','[^,]+')) + 1
)
PIVOT ( MAX(element) FOR lvl IN (1,2,3)) mypivot
) a, something.table b
Created
March 14, 2019 17:39
-
-
Save alexlopes/597b44dbf345f22dd8407d9215e3dc79 to your computer and use it in GitHub Desktop.
SQL Tricks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment