4 Replies Latest reply on May 21, 2018 12:46 PM by Mike Kutz

    Converting Rows to Columns through SQL

    Saumyadip Sarkar-Oracle

      Hi All,

      I have a table which looks like below:

          

      RegionINV_VOLADJ_VOLCM_VOL
      EMEA100200300
      JAPAC300400600
      LAD40010080
      NAMER200400800

       

      But my output should be

           

      RegionEMEAJAPACLADNAMER
      INV_VOL100300400200
      ADJ_VOL200400100400
      CM_VOL30060080800

       

      I know there are new feature in Oracle Database 11g called Pivot & Unpivot, however I am not able to understand how to use it. Any help on the query will highly be appreciated.