SQL2005 Compatibility | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SQL2005 Compatibility

hiii
"Non-integer constants are not allowed in the ORDER BY clause". i got this information from microsoft site as well as many forums regarding the SQL2005 compatibility issues, but when i tested this on 2005 server with compatibility set to 90 this works without any problem….
can anyone explain me whats going on????
thanks in advance Mat

run these option in your test envrionmet
sp_dbcmptlevel ‘AdventureWorks’, 80 SELECT * FROM dbo.ErrorLog ORDER BY ‘C’ — No errors sp_dbcmptlevel ‘AdventureWorks’, 90 SELECT * FROM dbo.ErrorLog ORDER BY ‘C’ — Will return and error
more detailhttp://msdn2.microsoft.com/en-us/library/ms178653.aspx —————————————-
Contributing Editor, Writer & Forums Moderator
http://www.SQL-Server-Performance.Com Visit my Blog at
http://dineshasanka.spaces.live.com/

SELECT * FROM dbo.ErrorLog ORDER BY ‘C’ — No errors here what is dbo.ErrorLog is it a system table when i execute that in userDB and master following error is coming up… Server: Msg 208, Level 16, State 1, Line 1
Invalid object name ‘ErrorLog’. Mat
I executed these in adventureworks database of SQL Server 2005 —————————————-
Contributing Editor, Writer & Forums Moderator
http://www.SQL-Server-Performance.Com Visit my Blog at
http://dineshasanka.spaces.live.com/

]]>