I am getting the following error while excuting following query in sqlserver 2005:
SELECT ProductName, UnitPrice,
ROW_NUMBER() OVER(ORDER BY UnitPrice DESC) AS PriceRank
FROM Products
ORDER BY UnitPrice DESC
if any one know what should be done to avoid this, please let me know.
Thanks in advance,
Rajanikanth.
Check and see if the database is running in SQL Server 2000 compatibility mode. Try running these two commands:
Code Snippet
select @.@.version
exec sp_dbcmptlevel 'yourDatabaseName'
|||As Kent stated, check that you are connecting to a SS 2005 server. You could be using the client tools shipped with 2005, but if you connect to a 2000 instance, for example, then you will not be able to use the new features from 2005. The db compatibility level does not limit you from using the new features, if it is hosted in a 2005 instance.
How to identify your SQL Server version and edition
http://support.microsoft.com/default.aspx?scid=kb;en-us;321185
AMB
sql
No comments:
Post a Comment