getting data from single column and inserting into multiple columns

  • example

    col1 col2 sno

    firmno 1 1

    firmtype ABS 2

    name XYZ 3

    type XXX 4

    desc AAA 5

    output table should be

    firmno firmtype name type desc

    1 ABS XYZ XXX AAA

  • Hi

    If you are using SQL2005, have a look at the PIVOT function in Books on-line.

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

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