July 4, 2016 at 3:55 am
Hi Folks,
I have encountered an interesting phenomenon whereby a stored procedure works flawlessly when called manually but when called from a Job Returns a fatal error:
The conversion of the data types varchar to datetime produced a value datetime out of interval
(I had to translate that from German so I hope it's accurate...)
Can anyone explain why that might be? It is a SQL Server 2008R2 fully-patched machine.....
Thanks!
Regards,
Kev
July 5, 2016 at 5:37 am
Hi,
The Problem is resolved.
The SQL Agent User had a different language Setting to that in the database. It was resolved by inserting SET LANGUAGE ENGLISH at the start of the script.
Without this Setting the month and day was reversed so that the month was interpreted as the day and vice versa.
Regards
Kev
July 5, 2016 at 5:55 am
kevaburg (7/5/2016)
Hi,The Problem is resolved.
The SQL Agent User had a different language Setting to that in the database. It was resolved by inserting SET LANGUAGE ENGLISH at the start of the script.
Without this Setting the month and day was reversed so that the month was interpreted as the day and vice versa.
Regards
Kev
Thanks for the feedback with the answer, Kev. I appreciate it.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply