Wednesday, July 2, 2014

Pivot trouble

just do this



SELECT *
FROM TableName t
PIVOT (SUM(qt) FOR [period] IN ([200101],[200102],[200103],...all other values here))p



to make it dynamic see


http://ift.tt/1cOmTxL




Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://ift.tt/19nLNVq http://ift.tt/1iEAj0c


No comments:

Post a Comment