As seen here: http://www.tsqltutorials.com/pivot.php
What if I don't have a column I can perform a SUM upon? How do I get a pivot'ed table result?
Thanks,
Matt.
As seen here: http://www.tsqltutorials.com/pivot.php
What if I don't have a column I can perform a SUM upon? How do I get a pivot'ed table result?
Thanks,
Matt.
There's always COUNT(0)
, another option is to create a common table expression and create an extra column on top of your query with the appropriate value and then use that for the PIVOT.