Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2004
    Posts
    21

    Unanswered: How to get Rows as column

    I have a table

    Table A
    --------
    month Hours Names
    ----- ------ -----
    01 10 name1
    01 20 name1
    01 30 name1
    02 10 name1
    02 20 name1
    02 30 name1

    01 10 name2
    01 20 name2
    01 30 name2
    02 10 name2
    02 20 name2
    02 30 name2


    I want the output of my query as

    month Name1 Name2
    ------- --------- -------
    01 60 0
    01 0 60
    02 60 0
    02 0 60


    So basically we are having the rows as columns as the output
    Is this possible with a single query, Has anyone done it.
    Last edited by dss; 01-20-04 at 16:24.

Posting Permissions

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