What I am trying to do is create a temp table in SQL Server 2008 that uses the column names from resultset
For example: this is what i get form my result set:
Account weight zone
22 5 1
23 3 2
22 5 1
23 3 2
24 7 3
From this result set, Zone
column values should be converted to dynamic column based on the zone count such as
Account weight zone 1 zone 2 zone 3
22 5 2
23 3 2
24 7 1
Please help me?