This select statement gives me the arithmetic error message:
SELECT CAST(FLOOR((CAST(LeftDate AS DECIMAL(12,5)))) AS DATETIME), LeftDate
FROM Table
WHERE LeftDate > '2008-12-31'
While this one works:
SELECT CAST(FLOOR((CAST(LeftDate AS DECIMAL(12,5)))) AS DATETIME), LeftDate
FROM Table
WHERE LeftDate < '2008-12-31'
Could there be something wrong with the data (I've checked for null values, and there are none)?