Wednesday, 18 March 2020

MSSQL - Fix Error - Operand data type bit is invalid for sum operator.


Watch this example on YouTube





To fix it replace

Select SUM(IsValid) as NumberOfValidRecords from Test1

with

Select SUM(Cast (IsValid) as NumberOfValidRecords from Test1

No comments:

Post a Comment