Rank business days (1 Viewer)

Alhakeem1977

Registered User.
Local time
Today, 18:56
Joined
Jun 24, 2017
Messages
308
I have got a table called deptSeq extracts the business days for the whole year as the below:
PK DDate Dept
1. 02-Jan-19 OFS
2. 02-Jan-19 DBC
3. 02-Jan-19 SAV
4. 03-Jan-19 OFS
5. 03-Jan-19 DBC
6. 03-Jan-19 SAV
,,,,,,,,,,,,,,,,,,,,,,,,

I want to return from the above table by a query as the below:

Rank DDate
1. 02-Jan-19
2. 03-Jan-19
3. 04-Jan-19
,,,,,,,,,,,,
My aim is to use the result for a table called tblTransactions.

How can I achieve solve this issue?

Thanks in advance.


Sent from my HUAWEI NXT-L29 using Tapatalk
 

Ranman256

Well-known member
Local time
Today, 11:56
Joined
Apr 9, 2015
Messages
4,339
the rank looks a simple ascending date.
(set unique values = true)

select DISTINCT Date from table
 

plog

Banishment Pending
Local time
Today, 10:56
Joined
May 11, 2011
Messages
11,611
This will require a subquery to first get unique dates:

Code:
SELECT DDate FROM deptSeq GROUP BY DDate

Name that 'sub'. Then to rank them use this query based on sub:

Code:
SELECT DCount("[DDate]", "sub", "[DDate]<=#" & [DDate] & "#") AS Rank, DDate
FROM sub
 

Alhakeem1977

Registered User.
Local time
Today, 18:56
Joined
Jun 24, 2017
Messages
308
This will require a subquery to first get unique dates:

Code:
SELECT DDate FROM deptSeq GROUP BY DDate

Name that 'sub'. Then to rank them use this query based on sub:

Code:
SELECT DCount("[DDate]", "sub", "[DDate]<=#" & [DDate] & "#") AS Rank, DDate
FROM sub
Thank you so much, it works perfect as of my desired.

I have have got an Ms Access database which generates barcode 128 and Code_39 from a vba code.

I would like if it's possible to generates a (2D) QR code from an ofline without internet vba code through a report.

Do you prefer to post it as a new thread?

Sent from my HUAWEI NXT-L29 using Tapatalk
 

Users who are viewing this thread

Top Bottom