Microsoft
Software
Hardware
Network
Question : Link Tables by Date Range in MS Access
I have two tables, one with cleint, start date, and end date. The other table has daily values for multiple clients. I would like to link the two whereby I get the daily values for each client for that client's specific start date and end date. For example, if my first table has the following:
Client Start Date End Date
A 1/1/09 3/1/09
B 2/1/09 5/7/09
C 7/6/09 12/15/09
And my second table has:
Client Date Value
A 1/1/09 555.55
A 1/2/09 555.55
A 1/3/09 555.55
A 1/4/09 555.55
B 2/1/09 666.66
B 2/2/09 666.66
B 2/3/09 666.66
B 2/4/09 666.66
B 2/5/09 666.66
B 2/6/09 666.66
I would like the results to be the values from Table 2 for client A from 1/1 to 1/4; and for client B from 2/1 to 2/6.
I considered linking the two tables by client and then using the DLookup function to get the start and end date criteria, but that will only give me the first start and end date in the table, not for the specific client.
Does anyone know if this is feasible?
Thank you.
Answer : Link Tables by Date Range in MS Access
hi kaypatrick, try...
select t2.*
from table2 t2
inner join table1 t1 on t2.client = t1.client
where t2.date between t1.[start date] and t1.[end date]
Random Solutions
XP - can't pass through the login stage
RDP Though Proxy
Using runtime themes on XP Embedded
SSRS - How can I increase a multi-value param dropdown? Got to be a way
Outlook Data File says "Not Available"
Forwarding a notification of a new Email Recived exchange
Can't find Outlook contacts folder
Loading images from directory into 5 Pictureboxes HOW?
Is there a way of inserting hyphens (-) into all of the existing phone numbers contained in my Outlook 2007 contacts list? So the format will be 123-456-7890 instead of 1234567890
Need SQL Syntax help to make my qry more efficient.