Oracle
 sql >> Datenbank >  >> RDS >> Oracle

Oracle PIVOT, zweimal?

Von oracle-developer.net es scheint, dass es so gemacht werden kann:

SELECT somethingId, splitId1, splitName1, splitId2, splitName2
FROM (SELECT somethingId, splitId
      FROM SOMETHING JOIN SPLIT ON ... )
      PIVOT ( MAX(splitId)  ,
              MAX(splitName) 
              FOR displayOrder IN (1 AS splitName1, 2 as splitName2)
            )