From: abdelilah on

"mccallen60" <mccallen60(a)discussions.microsoft.com> schrieb im Newsbeitrag
news:0EEEAC9E-66BD-44B3-9896-6F00425C21E6(a)microsoft.com...
> Hello,
> I am using Access 2003 on Windows XP. I need some help with setting up
> sales
> rankings for multiple territories.
>
> My SalesTable has three fields: CustID; TerrID; Sales. Here is the code I
> am
> currently using:
>
> Rank: (Select Count (*) from [SalesTable] Where [Sales] <
> [aliasSalesTable].[Sales])+1
>
> It produces the following:
> CustID TerrID Sales Rank
> 0001 10 100.00 1
> 0002 15 85.00 2
> 0003 10 83.00 3
> 0004 15 80.00 4
>
> Here's what I need it to produce:
> CustID TerrID Sales Rank
> 0001 10 100.00 1
> 0002 10 83.00 2
> 0003 15 85.00 1
> 0004 15 80.00 2
>
> I need each sales territory to be ranked individually based on their
> sales.
>
> Any help would be appreciated.
> Thanks in advance, Kevin

 | 
Pages: 1
Prev: mail
Next: Microsoft Access 2007 upgrade