Rahuul (8/2/2015)
Thanks a lot Jason.Saved my day!!
On another note, could it be done using Pivot?
Thanks again.
Rahuul
Using PIVOT for this can make things slower but, for more information, please see the following articles.
http://www.sqlservercentral.com/articles/T-SQL/63681/
http://www.sqlservercentral.com/articles/Crosstab/65048/
--Jeff Moden
Change is inevitable... Change for the better is not.