that error could occur if your database compatibility level is at 80 instead of 90;
the compatibility level determines which syntax version is applied to statements hitting the database, and rownnumber() is a 90 and above functionality.
change the version and you should be all set.
znkin (3/21/2009)
I tried your example with sql 2005 but it gives me this errorMsg 195, Level 15, State 10, Line 1
'ROWNUMBER' is not a recognized built-in function name.
Lowell