Microsoft
Software
Hardware
Network
Question : Comparing and Ranking Records
I have an access table with about 43k records.
The table has the ff fields:
[PrimaryKey]
[CustomerNum]
[ShipDate]
[ReceiptDate]
[ElapsedTime]
I need to rank each “CustomerNum” based on the “ElapsedTime”. The shortest “ElapsedTime” should be ranked 1, then so on.
Sample:
Key Customer Time
1 CustomerA 25
2 CustomerA 10
3 CustomerA 3
4 CustomerA 7
5 CustomerA 28
6 CustomerB 2
7 CustomerB 20
8 CustomerB 4
The query should result in:
Key Customer Time Rank
1 CustomerA 25 4
2 CustomerA 10 3
3 CustomerA 3 1
4 CustomerA 7 2
5 CustomerA 28 5
6 CustomerB 2 1
7 CustomerB 20 3
8 CustomerB 4 2
I hope this makes sense. Looking forward to your responses! Thanks!
Answer : Comparing and Ranking Records
test this query
select a.*, (select count(b.customer) from tableX as b where b.customer=a.customer and b.time<=a.time) as rank
from TableX as a
Random Solutions
Change style of the selected menu item
I am also trying to connect MS Access to NCR Teradata. I have not been able to connect through ADODB connection - when I try to open the connection I get this error: "Can't find host [MyServer]Cop1
Analysis services - MDX date calculation
handling empty textboxes
Condition statement to change wording in div block
Access Form Freezing/Locking Up
isa 2006 std authenticating users
Using FTYPE COMMAND in a batch file how to include "%1" by escaping the % sign.
Need some help with printing PrintDialogbox
'0' is not a valid value for 'value'. 'value' should be between 'minimum' and 'maximum'.