A
Alastair MacFarlane
Dear All
I have to tables with the schema below (see end of e-mail). I would like to
create a query that has an output like the following:
ID SaleDate Period
1 05/04/2006 1
2 05/05/2006 2
3 08/06/2006 3
What I am not sure about is how to calculate this without either code or a
DLookup. This would be very slow when I am looking at many millions of
records. I have a known date value in table 1 and I want to return the period
for that particular date in table 2 when I only have a date range as a guide.
Thanks again for your help.
Alastair MacFarlane
Table 1
ID SaleDate
1 05/04/2006
2 05/05/2006
3 08/06/2006
Table 2
ID Year Period StartDate EndDate
27 2006/07 1 01/04/2006 28/04/2006
28 2006/07 2 29/04/2006 26/05/2006
29 2006/07 3 27/05/2006 23/06/2006
I have to tables with the schema below (see end of e-mail). I would like to
create a query that has an output like the following:
ID SaleDate Period
1 05/04/2006 1
2 05/05/2006 2
3 08/06/2006 3
What I am not sure about is how to calculate this without either code or a
DLookup. This would be very slow when I am looking at many millions of
records. I have a known date value in table 1 and I want to return the period
for that particular date in table 2 when I only have a date range as a guide.
Thanks again for your help.
Alastair MacFarlane
Table 1
ID SaleDate
1 05/04/2006
2 05/05/2006
3 08/06/2006
Table 2
ID Year Period StartDate EndDate
27 2006/07 1 01/04/2006 28/04/2006
28 2006/07 2 29/04/2006 26/05/2006
29 2006/07 3 27/05/2006 23/06/2006