Click here to Skip to main content
15,895,507 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it possible to fill in "...." below with @Variable_1, a query or something similar to avoid dynamic sql with a variable # of columns? I have been unsuccessful doing so and have had to resort to dynamic sql.

PIVOT( X FOR Y IN [...])
Posted
Updated 20-Apr-11 13:49pm
v2
Comments
HimanshuJoshi 20-Apr-11 19:49pm    
Edited to correct pre tag.

1 solution

No. It would be dynamic or build a table
 
Share this answer
 
Comments
benedict10 30-Oct-12 2:27am    
use the temp table the try

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900