Transpose of Rows To Columns in Sql Server2008

  • Hi all,

    I have got the query results in rowwise for phases for a given project id by cross join with the phase table.

    Phase table -(umt_phases)

    phaseid Phasecode Phasename

    1 G1 Planning

    2 G2 Requirements

    3 G3 Design

    4 Build Development

    5 Test Testing

    6 Implement Deploy

    I am in need of phases in column wise and as well details corresponding to the phases

    Database used; SQL server2008 and Reporting tool : Crystal reports

    ex:

    Phases: Planning Requirements Design Development Testing Implement

    I would like to have the results as per the attached notepad

    Can you please help me at the earliest?

    Thanks in advance

    Thanks and Regards,

    Arumugam B

  • Google PIVOT and UNPIVOT for SQL Server. Also, look at CROSS TABS for SQL Server.

    Jared
    CE - Microsoft

  • Hi Jared

    Thanks. Can you please suggest from my scenario? I am not getting the results as expected.

    My requirement is to get the finish dates in rowwise corresponding to the phases listed as columns.

    Appreciate your help.

    Thanks and Regards,

    Arumugam B

  • No offense, but I'm not going to do your work for you. That's what I get paid for 🙂 What have you tried and what is causing you issues? I can help with specific issues you are having, but I won't write a whole query for your issue. Post the query that you are using to pivot the data.

    Jared
    CE - Microsoft

Viewing 4 posts - 1 through 3 (of 3 total)

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