SQL Server Performance

rows to columns

Discussion in 'SQL Server 2005 General Developer Questions' started by joanne, Dec 6, 2010.

  1. joanne New Member

    I have a table with 2 columns:
    No SerialNumber
    123 4GB6Y78
    123 53F7TH
    124 4GB6Y78
    124 53F7TH
    124 53E8BX
    the question is :
    how to get the results as following:
    123 4GB6Y78 53F7TH
    124 4GB6Y78 53F7TH 53E8BX
    125 with 6 columns....
    Thank you very much!
  2. Luis Martin Moderator

  3. FrankKalis Moderator

    Since you've posted this in the SQL Server 2005 forum, have a look at PIVOT() in the Books Online.

Share This Page