Good morning!
I need the result of this SQL:
SELECT
CD_ITEM_PAI,
CD_ITEM_FILHO
FROM ESTRUTURA
WHERE CD_ITEM_PAI = 707534
That at the moment is this:
Be that as it may:
Can you help me?
Using PIVOT I did not get the result, because the functions COUNT, SUM, etc. do not serve in my case.
Search by PIVOT.
– anonimo
does that help? https://answall.com/questions/224886/using-pivot-oracle
– Ricardo Pontual
I would like the result. I tried to do it with PIVOT but I couldn’t. I know it’s simple, so I wanted the answer to learn.
– Wellington Nowicki
For columnar I find it complicated because it is not known the number of columns , numbering the columns with rownum and making a case with max daria but it would have the question of the number of columns https://answall.com/questions/22074/usa-operador-pivot-sem-agrega%C3%A7%C3%A3o , or try the LISTAGG https://www.techonthenet.com/oracle/functions/listagg.php
– Motta