Column data need to be retreived in Row format
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Column data need to be retreived in Row format

  1. #1
    Join Date
    Aug 2001
    Posts
    56

    Column data need to be retreived in Row format

    Hi All,

    Mt Data is in this Format:

    Table A:

    Instr_id
    --------
    157
    158
    159

    Table B:

    Instr_id---id_ctxt_typ---iss_id
    -------------------------------
    157 NASDAQ 123
    157 CUSIP 456
    157 COMPANY 789

    I need to get data in this format by using these two tables:

    Instr_id NASDAQ CUSIP COMPANY
    --------------------------------
    157 123 456 789
    158 zzz yyy xxx

    How can I generate a sql which gives this type of format data.

    Thanks&Regards,
    Anuj
    Anuj
    India

  2. #2
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Search for "pivot" here: http://asktom.oracle.com/

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