Search code examples
sqlsql-server-2000sql-server-2014

Query that runs in SQL Server 2000 does no longer run in SQL Server 2014


I have a query that runs ok on SQL Server 2000, but does no longer run in SQL Server 2014:

insert into chequetmp 
    select * 
    from nopagados
    where convert (datetime, estimado) >= '02/09/2015'
      and convert (datetime, estimado) <= '02/09/2015'

Solution

  • That's the only date formatting that i fear, the one using "/". It's the only format i've seen as both dd/mm/yyyy AND mm/dd/yyyy. Hence, try turning '02/09/2015' to '2015-09-02' and see what happens.

    Hope this helps!