Click here to Skip to main content
15,890,123 members

Comments by Hernán Hegykozi (Top 3 by date)

Hernán Hegykozi 22-May-13 16:18pm View    
Reason for my vote of 5 \n Excelent!!!!!
Hernán Hegykozi 27-Dec-12 18:47pm View    
Reason for my vote of 5 \n excellent article!

I leave some more code.

Sum Total:


SELECT SUM(td2.ColValues)
FROM TestData td
UNPIVOT (ColValues FOR ColHeader IN (Col2, Col3)) AS td2


Sum total column:

SELECT td2.ColHeader, SUM(td2.ColValues)
FROM TestData td
UNPIVOT (ColValues FOR ColHeader IN (Col1, Col2, Col3)) AS td2
GROUP BY td2.ColHeader
Hernán Hegykozi 2-Nov-12 17:48pm View    
Reason for my vote of 5
Nice article!! :)