how to convert 2 rows into one column

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kevinkwh
    New Member
    • Feb 2010
    • 13

    how to convert 2 rows into one column

    i wannn convert the following.
    thx in advance.

    data table

    desc nvarchar(100),
    amount numeric(18,2)

    FROM

    desc amount

    commercial 5000
    commercial 8000

    TO

    desc amount1 amount2
    commercial 5000 8000
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Check PIVOT/UNPIVOT in SQL Server.

    Happy Coding!!!

    ~~ CK

    Comment

    • kevinkwh
      New Member
      • Feb 2010
      • 13

      #3
      Ok !!! will try !!! thx alot

      Comment

      • kabilahan
        New Member
        • May 2007
        • 14

        #4
        hi
        check this to know about PIVOT

        Comment

        • kevinkwh
          New Member
          • Feb 2010
          • 13

          #5
          Thx , It helps me alot .

          Comment

          Working...