That's because SQL Server doesn't support implicit string-to-int conversions. On SQL Server 2012, it passes by some sort of luck, because the conversion doesn't need to be performed to execute the query, but SQL Server 2014 seems to attempt the conversion even though it is not necessary (it is in the right side of a conjunction whose left side returns zero values, something like "WHERE 2=3 AND 'abc' in (1,2,3)". So that's a minor difference in the behavior of this DB. I think the query can be skipped for SQL Server and should be really only done for SybaseAnywhereDialect, as it is mentioned in the comment above the query.
|