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
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.
In addition to Karthick (search is indeed much better!) and Blu (let's hope OP bookmarks the FAQ-link ):
Tim Hall's Oracle-Base is loaded with articles and examples regarding them:
you can find lots more examples if you search on http://asktom.oracle.com
Keep in mind that aggregating columns <> pivoting
And some more profound explanations: