How can use the function SUM() for bit columns in T-SQL?
When I try do it as below:
SELECT SUM(bitColumn) FROM MyTable;
I get the e
You can achieve by using CONVERT,
CONVERT
SELECT SUM(CONVERT(INT, bitColumn)) FROM MyTable