Convert Rows into Columns

  • Hi,

    I have one table named "TblTest" when i use select * from TblTest then I got this result

    ID      QUE                             ANS

    1      Name                            sanket

    1      AGE                              27

    2      Name                            sanjay

    2      AGE                              26

    now I want to convert this output to below format like rows into columns like this

    ID   Name     AGE

    1    sanket    27

    2    sanjay    26

    Please send solution i just need this result to export to CSV file.

     

     

     

     

     

    Regards

  • Hi Sanket,

    This is very commonly requested. These articles should help you find the technique that will work best for you...

    http://www.sqlteam.com/item.asp?ItemID=2955

    http://www.sqlteam.com/item.asp?ItemID=5741

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • Thanks Dear

    Regards

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply