sql server 2005 - Pivot sql query -


i've sql server 2005 table competitor (id, title, cdate, price) want format query view in gridview this: alt text http://i46.tinypic.com/2cmxg76.jpg

please me writing sql query.

sql 2005 supports pivot - books online doc http://msdn.microsoft.com/en-us/library/ms177410(sql.90).aspx

the main shortcoming i've found pivot stuff must specify column names, although can use query beforehand , inject values varchar variable , execute that.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -