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.
Author |
Topic |
ayu
Starting Member
43 Posts |
Posted - 2008-04-08 : 12:39:51
|
i m using sql 2000 my query:SELECT no, name, desc,createddateFROM ( SELECT no, name, desc,createddate, RANK() OVER (PARTITION BY name) AS RecID FROM compilationt ) AS aWHERE RecID = 1it gives me error:'RANK' is not a recognized function name. |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-04-08 : 12:43:29
|
RANK() is supported only in SQL Server 2005 and higher version.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-08 : 12:46:24
|
You have two choices.1) Use a correlated subquery.2) Use a temp table with an IDENTITY column. E 12°55'05.25"N 56°04'39.16" |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-08 : 12:50:16
|
one of methods:-http://www.codeproject.com/KB/reporting-services/Rank_Query.aspx |
 |
|
ayu
Starting Member
43 Posts |
Posted - 2008-04-08 : 14:04:32
|
thanks visakh,this article helps a lot!! |
 |
|
|
|
|