June 18, 2012 at 1:50 am
hi
i have a table with customer cod and score of them ,
i wanna ranking them,
for example if score of them was,2000,1000,2000.2050
ranking them be respectivity, 2 , 3 , 2 , 1
so when both of them have 2000 for score they are in second level,
please help me how to ranking them , base on their score
i am new in ssrs , if you can plz help me
June 18, 2012 at 2:39 am
is not any response
June 18, 2012 at 2:53 am
This was removed by the editor as SPAM
June 18, 2012 at 3:19 am
A class of functions in T-SQL called as Windowing Function can be used to get the desired result as in your case. You must also understand the scenario where to use them, as each of these functions have a speciifc feature.
More Information: http://www.simple-talk.com/sql/learn-sql-server/window-functions-in-sql-server/[/url]
Raunak J
June 18, 2012 at 3:26 am
i tried this command, but for same score, rank value is diffrent
June 18, 2012 at 3:37 am
Replace Rank with Dense_Rank.
Raunak J
June 18, 2012 at 3:39 am
i wanna if two customer, have the same score, they be in the same level
for example
if we have four customer with below score
cucode score
A 100
B 250
c 100
D 300
for thiese score level of them shold be
D 1
B 2
C 3
A 3
June 18, 2012 at 3:43 am
SELECT cust_No, Score, DENSE_RANK() OVER (Partition by Score order by Score, Cust_No) AS Ranking
FROM MyCustScoring
ORDER BY Ranking
June 18, 2012 at 3:44 am
error:The OVER SQL construct or statement is not supported.
June 18, 2012 at 3:47 am
If you have AdventureWorks installed. Try this.
select
[New Rank] = DENSE_RANK () OVER(order by FactInternetSales.orderdatekey)
, *
from FactInternetSales
Raunak J
June 18, 2012 at 3:50 am
June 18, 2012 at 3:53 am
my question is diffrent, you think that you have diffrent student, with diffrent score. you wanna get them a level , if two of them have same score , they are in same level
June 18, 2012 at 3:56 am
What data set is the DENSE_RANK() giving you. Also, paste the SQL you are using.
Raunak J
June 18, 2012 at 3:59 am
SELECT cust_No, Score, DENSE_RANK() OVER (order by score) AS ScoreRanking
FROM MyCustScoring
June 18, 2012 at 4:02 am
i dont have adventurework, why this errore accure
Viewing 15 posts - 1 through 15 (of 21 total)
You must be logged in to reply to this topic. Login to reply