• Chris Harshman (10/21/2016)


    Talvin Singh (10/21/2016)


    the first line are categories, which were created with case statements eg

    count(case when [order line] = 1 then 1 end) [1]

    Maybe I'm missing something, I'd have to see the entire query, but if you're currently creating columns using this method and want them to be rows, don't try to unpivot the pivoted data, wouldn't you just need a table that groups the lines together, something like:

    +1

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2