Creating Pivot Table

  • Hi,

    I am new to the forum and shall be thankfull if somebody can help me find information on how to generate pivot table using sql. We can do this in excel very easily.

    Is there any way we can use our data to generate pivot table similar to Excel.

    Thanks,

    Tushar

  • Hi Tushar,

    Look up "cross-tab reports" in Books Online... it has a great example of how to do a "Cross Tab" which some call a "Pivot".  If you want true pivots, take a look at OLAP and data marts in Books Online.

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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