From: . on 4 Aug 2010 14:52 Hello when running some SQL code in SQL Server 2000 Query Analyzer it runs successfully returning the data set, but when copying/pasting the same code into SQL Server 2005 query I get a couple of errors mentioned in subject here. Are there any settings/configurations differences that I need to adjust? Thanks in advance.
From: Erland Sommarskog on 4 Aug 2010 15:50 .. (nothing(a)nothing.com) writes: > Hello when running some SQL code in SQL Server 2000 Query Analyzer it > runs successfully returning the data set, but when copying/pasting the > same code into SQL Server 2005 query I get a couple of errors mentioned > in subject here. Are there any settings/configurations differences that > I need to adjust? Thanks in advance. Try sp_dbcmptlevel yourdb, 80 However, there were bugs in SQL 2000 where incorrect syntax was not flagged. This was corrected in SQL 2005, but I'm uncertain if the bad syntax is permitted even in compatibilty mode 80. -- Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
From: . on 4 Aug 2010 19:32 Thanks as always for your helpful insight Erland, cheers :-) "Erland Sommarskog" <esquel(a)sommarskog.se> wrote in message news:Xns9DCADE1C65D05Yazorman(a)127.0.0.1... >. (nothing(a)nothing.com) writes: >> Hello when running some SQL code in SQL Server 2000 Query Analyzer it >> runs successfully returning the data set, but when copying/pasting the >> same code into SQL Server 2005 query I get a couple of errors mentioned >> in subject here. Are there any settings/configurations differences that >> I need to adjust? Thanks in advance. > > Try > > sp_dbcmptlevel yourdb, 80 > > However, there were bugs in SQL 2000 where incorrect syntax was not > flagged. This was corrected in SQL 2005, but I'm uncertain if the bad > syntax is permitted even in compatibilty mode 80. > > > -- > Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se > > Links for SQL Server Books Online: > SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx > SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx > SQL 2000: > http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx >
|
Pages: 1 Prev: Routed Through Client? Next: how to keep data mods in a doomed transaction |