3 Replies Latest reply: Jun 20, 2013 8:23 AM by Hoek RSS

    Row to Column Conversion

    1007945

      Hi Team

       

      CREATE TABLE T1 (COL1 NUMBER,COL1 VARCHAR2(100));
      
      INSERT INTO T1 VALUES(50,'PPRT_DEF_ACC_MANGER');
      INSERT INTO T1 VALUES(51,'PPRT_DEF_CR_CNTROLER');
      INSERT INTO T1 VALUES(51,'PPRT_DEF_DR_CNTROLER');
      INSERT INTO T1 VALUES(51,'PPRT_DEF_IR_CNTROLER');
      

       

      i want output like

      A1  A2

      ---------

      50   51

       

      i understand that we can use below methods to get the out put  row to column but plz i want one example for all below option .

       

      Use the SYS_CONNECT_BY_PATH operator

      Use Oracle Cross Join

      The 11g SQL pivot operator

      The CASE statement

      Using the 11g within group SQL syntax

      SQL wm_concat function

       

      Thanks in Advance.