When we execute following statement:
select count(*) where '4782171445023473664' > 0
we get:
select count() where '4782171445023473664' > 0;
Data conversion error converting "4782171445023473664"; SQL statement:
select count() where '4782171445023473664' > 0 [22018-176] 22018/22018
We have to cast 0 to bigint in this statement:
select count(*) where '4782171445023473664' > Cast(0 as BIGINT)
Only then it works fine.
I belive this should be possible without casting 0 to bigint.