Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase ««12

serial no Expand / Collapse
Posted Saturday, March 21, 2009 6:27 AM



Group: General Forum Members
Last Login: Today @ 4:27 PM
Points: 14,543, Visits: 38,399
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 error

Msg 195, Level 15, State 10, Line 1
'ROWNUMBER' is not a recognized built-in function name.


help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #680902
Posted Saturday, March 21, 2009 6:56 AM



Group: General Forum Members
Last Login: Wednesday, February 10, 2016 11:50 AM
Points: 6,897, Visits: 13,559
I don't think it's the compatibility level...
Looks more like a typo: ROWNUMBER vs. ROW_NUMBER()
Underscores sometimes matter
The RowNumber function is for Reporting Services.

A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #680905
Posted Saturday, March 21, 2009 9:36 AM



Group: General Forum Members
Last Login: Today @ 7:08 PM
Points: 42,059, Visits: 39,442
Dangit... sorry folks... I posted in a hurry and left out the underscore in ROW_NUMBER(). Andrew has the correct code and I went back to my previous erroneous post and fixed that, as well.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

Helpful Links:
How to post code problems
How to post performance problems
Post #680931
Posted Thursday, January 10, 2013 11:20 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 17, 2014 3:45 AM
Points: 1, Visits: 6
I want devide this table in to groups like in first block display Id(1-5) and second block desplay data (5-10) and onward plz help
Post #1405773
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse