2
I’m trying to turn the column "prtnum" branded yellow in Line, I’m trying to use the PIVOT but I’m not succeeding I’ve tried some ways and not right:
Select
Distinct (ORD_LINE.ordnum),
ORD_LINE.prtnum,
Sum (ORD_LINE.ordqty)
From ORD_LINE
Where
ORD_LINE.entdte >= trunc (sysdate, 'MM')
Group By ORD_LINE.ordnum,ORD_LINE.prtnum
You are using correct Oracle?
– David
That’s right, buddy
– Ariel Gonçalves
Pivot on Oracle has to report ALL possible occurrences, I do not know if in this case pivot ( Sum (ORD_LINE.ordqty) for state_code in ('7131410','7196660'...) )
– Motta