Skip to content
Advertisement

Tag: quotename

Dynamic Pivot Table by Month

I’m trying to create a dynamic pivot table in SQL that will report based on month and year. I did a bunch of research and was able to come up with the below query: I am able to print the @column variable successfully, but the problems happen when I try to set it in the @dynamic variable. The error message

Advertisement