Oracle
 sql >> Base de Dados >  >> RDS >> Oracle

Divida a coluna em várias linhas


E a resposta correta é.
select Number, substr(
Site, 
instr(','||Site,',',1,seq),
instr(','||Site||',',',',1,seq+1) - instr(','||Site,',',1,seq)-1)  Site
from Sitetable,(select level seq from dual connect by level <= 100) seqgen
where instr(','||Site,',',1,seq) > 0