Converting columns into rows

  • Hi friends,

    i've a table where in i've storing details of employees with their attendance details, now i want to query in such a way that i should get the output in this fashion....

    Name 01/01/2009 01/02/2009 01/03/2009

    abc present present present

    pqr present present present

    axs present present present

    mno absent present present

    but my database table is in this fashion

    Name Status Date

    abc present 01/01/2009

    pqr present 01/01/2009

    axs present 01/01/2009

    mno absent 01/01/2009

    abc present 01/01/2009

    pqr present 01/01/2009

    axs present 01/01/2009

    mno absent 01/01/2009

    please guide me how to query the table so that i can get the desired output.

  • You can have a look at this article:

    http://www.sqlservercentral.com/articles/T-SQL/63681/

    ciao

    Giacomo

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

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