Query Works Locally But Not On Server

Discussion in 'Databases' started by charityche1, Sep 5, 2012.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I have a stored procedure which calculates a persons age based on birthday. The procedure uses isdate, convert varchar, datediff & getdate to accomplish this. When I run the procedure on my local machine everything works fine. However, after I load everything on to the server and try to run from there I get the following error: "Conversion failed when converting date and/or time from character string".

    Has anyone else had this issue? Can anyone provide some ideas on how to correct this? I can post the entire procedure if needed.

    Thanks!
     
  2. It's clearly a date format / data conversion error being thrown by Sql Server. Here are two things you can try:
    1. Use real DateTime variable types rather than trying to convert between strings and dates OR
    2. Change the language for your Sql Server logon account using ALTER LOGIN
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page