Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

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


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:01 PM
Points: 12,744, Visits: 31,074
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.



Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #680902
Posted Saturday, March 21, 2009 6:56 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:43 PM
Points: 6,930, Visits: 12,646
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.




Lutz
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


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 7:25 AM
Points: 35,959, Visits: 30,253
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."

"Change is inevitable. Change for the better is not." -- 04 August 2013
(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

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: Thursday, January 10, 2013 11:13 PM
Points: 1, Visits: 3
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