• tnpich (9/1/2015)


    I have code that creates a pivot table from a view and then appends a summary row with a UNION ALL.

    I need to take the above output and put it into a table that can be displayed on a website and downloaded if necessary.

    Will the published procedure do that?

    Which one? A lot of people have made entries on this thread.

    Also, your method above hits the table twice. Once for the pivot and once for the total. It's probably not necessary if you were to do the pivot with a CROSSTAB/GROUP and use WITH ROLLUP or similar.

    --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)