Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 'Rownumber is not a recognized function name'

Author  Topic 

theboyholty
Posting Yak Master

226 Posts

Posted - 2009-04-01 : 11:57:43
I've been trying to get my head round the Rownumber function and i've found various useful things online but when I try to use it I am told that 'ROWNUMBER' is not a recognized function name. I get the same error with ROW_NUMBER.

I'd be interested to know if anyone has used it and why its not working for me.

I'm using SQLServer 2005.

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-04-01 : 12:17:50
what is the compatibility level of ur DB...shud be set to 90.

Use sp_dbcmptlevel 'DatabaseName' to find out the compatibility.
Go to Top of Page

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2009-04-01 : 12:33:19
Make sure you are using the syntax

select Row_Number() over (Order by [MYCOLUMNNAME])


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881
Go to Top of Page
   

- Advertisement -