rows to column
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: rows to column

  1. #1
    Join Date
    Nov 2006
    Posts
    1

    Exclamation rows to column

    i have two tables. detail(ci_key,date,desc) and security(sec_key,ci_key,symbol,desc). the foreign key is ci_ key

    select * from security ---- displays

    sec_key ci_key symbol desc
    -----------------------------------------
    61 84 a SOME DESC
    63 84 b SOME DESC
    65 84 c SOME DESC
    69 85 u SOME DESC
    71 85 t SOME DESC
    73 85 r SOME DESC
    75 91 i SOME DESC
    77 91 o SOME DESC
    79 91 p SOME DESC


    i want to display it as...

    84 a SOME DESC b SOME DESC c SOME DESC
    85 u SOME DESC t SOME DESC r SOME DESC
    91 i SOME DESC o SOME DESC p SOME DESC

    is there a way to achieve this? can someone help me with this problem?

    thanks
    san

  2. #2
    Join Date
    Nov 2006
    Posts
    1

    Is this Pivoting?

    I think this a problem called as Pivoting.
    DO search for pivoting in asktom.oracle.com
    Hope this will help you.
    -Sameer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width