Mansfield (4/10/2013)
What will consume the results of the query? Just about any reporting front-end will have the facility to pivot the results to the format you want. This is the ideal solution.IF pivoting your result set is unavoidable, then you can dynamically construct the pivot query. There is a recent thread regarding how to do this.
There are more than 200 threads per day. It would be nice if you posted the URL for the "recent" thread. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.