On SQL Server 2005 take a look at the PIVOT operator:
http://msdn.microsoft.com/en-us/library/ms177410.aspx
Have in mind PIVOT performs static pivoting (you have to know the pivot
values in advance). For dynamic pivoting (which is more like TRANSFORM) take
a look at the following articles:
http://www.sqlteam.com/article/dynamic-cross-tabs-pivot-tables
http://www.sqlmag.com/Articles/ArticleID/93907/93907.html
http://weblogs.sqlteam.com/jeffs/archive/2005/05/02/4842.aspx
HTH,
Plamen Ratchev
http://www.SQLStudio.com
aushknotes - 30 Jun 2008 23:19 GMT
Hi Plamen,
Thanks very much for your reading suggestions and the limitations on static
vs dynamic pivot tables. I guess I will probably consider executing the
Transform Crosstab query on Access DB, output the query results to a
spreadsheet or webpage then.
Many thanks!
> On SQL Server 2005 take a look at the PIVOT operator:
> http://msdn.microsoft.com/en-us/library/ms177410.aspx
[quoted text clipped - 10 lines]
> Plamen Ratchev
> http://www.SQLStudio.com