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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 ranking rules table

Author  Topic 

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2010-08-25 : 18:06:34
greetings

I am trying to use a ranking table that has the 'rules' of ranking identical products such as beer. I want this ranking to be dynamic so that it uses this ranking table to say this item is number #1 this week based on ranking table. The different values to rank on are how old is brand, the older the item the higher the ranking meaning it comes to the top of the list. Anyone ever tried something like that or could point me to a good read abotu dynamic ranking?

Thanks

If you don't have the passion to help people, you have no passion

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2010-08-26 : 11:15:56
Can't you just order the result set by the age of the brand?

________________________________________________
If it is not practically useful, then it is practically useless.
________________________________________________
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-08-26 : 11:25:20
if its a single rule its as simple as what blindman suggested. If its complex with lot of criteria you can add a table with rules and weightage for each and then another table which links rules to products with values for it.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -