Home Forums SQL Server 2008 T-SQL (SS2K8) where filter col <> 0 returns error, col > 0 works, col contains no 0 RE: where filter col <> 0 returns error, col > 0 works, col contains no 0
dan-572483
SSCoach
Points: 15870
More actions
July 18, 2013 at 10:42 am
#1633729
I'd guess you have at least one record with an ID that is a negative number, and has a value in DATE that cannot be converted to a DATETIME value.
Try
SELECT * FROM TABLE WHERE ID < 0