I avoid the PIVOT operator and instead use the ancient "Black Art" of CROSSTABs because of more flexibility, functionality and performance.
If you want dynamic CROSSTABs, those are pretty easy, as well.
https://www.sqlservercentral.com/articles/cross-tabs-and-pivots-part-2-dynamic-cross-tabs
--Jeff Moden
Change is inevitable... Change for the better is not.
November 17, 2021 at 7:58 pm
Thanks that helped me find a solution.
November 18, 2021 at 3:23 am
Thanks that helped me find a solution.
Awesome. Thank you for the feedback!
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply