1 Reply Latest reply: May 9, 2012 5:16 PM by Frank Kulash RSS

    I need to Show the table row as colums

    ShankarViji
      I have data in a table like below... I need it in Oracle 9i

      A     B     C D     E     F

      *100000275     2     4     600000276     15     5*
      *100000275      2     5     150000291     2     30*
      600000264      2     4     150000278     15     30
      *100000267      2     3     600000264     15     5*
      *100000267      2     4     150000278     15     30*
      600000278     2     5     150000292     2     30
      600000275      2     6     150000290     2     30


      I need to show this data as

      A A(1st val) A(2nd val)................A(3 Val)
      100000275     600000276     150000291
      100000267 600000264     150000278

      That is for thje
      Can you help me in this ??????



      Regards,
      Shankar

      Edited by: user13653236 on May 8, 2012 8:45 PM

      Edited by: user13653236 on May 9, 2012 2:21 AM
        • 1. Pivot
          Frank Kulash
          Hi, Shankar,

          Taking 1 column from N rows and displaying that as N columns on 1 row is called Pivoting . See {message:id=9360005} for some useful links about how to do it. Like a lot of things, it depends on your version.

          This is a SQL question. You'll get more attention if you post it in the SQL forum. Mark this thread as "Answered", then start a new thread in
          PL/SQL

          Include CREATE TABLE and INSERT statements for a little sample data, and the results you want from that data.
          Always say which version of Oracle you're using.