Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SqlServer 2000 compatibility

The developer environment db server is SqlServer 2005 (developer edition)

Is there any way to make sure my SQL Queries will run in SqlServer 2000?

This database is set to Compatibility level "SQL Server 2000 (80)" but some queries that run without problems in the development system can not run in the Test Server (SqlServer).

(The problems seems to be in subqueries)

like image 358
pkario Avatar asked Apr 09 '26 23:04

pkario


1 Answers

Compatibility levels are designed to work the opposite way - to allow an older version of T-SQL code to work without modifications on a newer version of SQL Server. The changes typically involve T-SQL syntax and reserved words, and it's possible to use SQL Server 2005 features such as INCLUDED columns in indexes on a database in Compatibility Level 80. However, you can't use 2005 T-SQL features such as CROSS APPLY.

Your best option is to develop/test all your code against a SQL Server 2000 instance. Note that you can use 2005's Management Studio to connect to the SQL Server 2000 instance, so you don't have to go backwards with regards to tools.

like image 82
Jim McLeod Avatar answered Apr 11 '26 14:04

Jim McLeod



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!