Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010
    Posts
    2

    Unanswered: Convert Column value to Row

    Hi,

    I want to convert Single Column values to Row.

    Table Original Content:

    Code Amount Expenditure
    10027 5000.00 LOCAL CONVEYANCE
    10027 320.00 LOCAL CONVEYANCE
    10116 1589.00 TRAVEL EXPENSES
    10095 350.00 LOCAL CONVEYANCE
    10095 1215.00 TRAVEL EXPENSES

    Expected Output :

    Code LC TE
    10027 5000.00 NULL
    10027 320.00 NULL
    10116 NULL 1589.00
    10095 350.00 1215.00


    Thanks in Advance
    Attached Thumbnails Attached Thumbnails Untitled picture.png   Untitled picture1.png  

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    the SQL in your first screenshot works, right?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •