Pivots with Dynamic Columns in SQL Server 2005/2008
[출처] http://www.sqlprof.com/blogs/sqldev/default.aspx Pivots with Dynamic Columns in SQL Server 2005/2008 Pivots in SQL Server 2005/2008 can convert row into column data. Pivots are frequently used in reports, and are reasonably easy to work with. However, many people have asked me how to make the column list dynamic. Normally, this list is fixed, but many times the new columns are determined by..