But did it actually work yesterday?
If the day is Friday, Noverber 13th, or the 13th day of any other month, and your query blows up for the first time, one place to search for is character strings converted to datetime values. The following script illustrates the problem:
-- yesterday it worked, or did it?
SET LANGUAGE US_English;
SELECT CAST('11/12/2009' AS DATETIME);
SET LANGUAGE Norwegian;
SELECT CAST('11/12/2009' AS DATETIME);
Changed language setting to us_english.
-----------------------
2009-11-12 00:00:00.000
(1 row(s) affected)
Changed language setting to Norsk.
-----------------------
2009-12-11 00:00:00.000
(1 row(s) affected)
-- today it's not working
SET LANGUAGE US_English;
SELECT CAST('11/13/2009' AS DATETIME);
SET LANGUAGE Norwegian;
SELECT CAST('11/13/2009' AS DATETIME);
Changed language setting to us_english.
-----------------------
2009-11-13 00:00:00.000
(1 row(s) affected)
Changed language setting to Norsk.
-----------------------
Msg 242, Level 16, State 3, Line 11
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
Note that the query did not quite work yesterday either - although it did not raise errors, it was selecting the wrong data.