problem in ssrs expression

  • 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

  • is not any response

  • This was removed by the editor as SPAM

  • 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

  • i tried this command, but for same score, rank value is diffrent

  • Replace Rank with Dense_Rank.

    Raunak J

  • 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

  • SELECT cust_No, Score, DENSE_RANK() OVER (Partition by Score order by Score, Cust_No) AS Ranking

    FROM MyCustScoring

    ORDER BY Ranking

  • error:The OVER SQL construct or statement is not supported.

  • If you have AdventureWorks installed. Try this.

    select

    [New Rank] = DENSE_RANK () OVER(order by FactInternetSales.orderdatekey)

    , *

    from FactInternetSales

    Raunak J

  • 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

  • What data set is the DENSE_RANK() giving you. Also, paste the SQL you are using.

    Raunak J

  • SELECT cust_No, Score, DENSE_RANK() OVER (order by score) AS ScoreRanking

    FROM MyCustScoring

  • 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