These queries return unexpected results for me.
SELECT 'Test' WHERE '00001000' = 1000
SELECT 'Test' WHERE '00001000' = '1000'
SELECT 'Test' WHERE 0001000 = 1000
I would expect it to be no results, no results, results, but instead the first query returns results. It seems that SQL will try and convert the string to an int to do the comparison, instead of the other way around. Is there a reason for this?