Question Locked

Left Join and Union Query in Access

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have three tables as below

Timesheet - weekdate, id, name, hrs

Bill Table - weekdate, id, name, rate, hrs

Resource Table - fromweekdate, toweekdate id, name, rate, po, poname

I need a query that satisfies the following conditions:

1) Select all the records from Timesheet

2) Select weekend, rate, hrs from Bill Table for the weekends of Timesheet Table

3)Select the resouce record should the Timesheet weekend fall with between the Fromweekdate amd Toweekdate

Please help me with query on the above requirement.

Thanks
Gary

2 replies

by john.a.wills

SELECT...
FROM (TimeSheet LEFT JOIN Bill
ON TimeSheet.weekdate = Bill.weekdate)
LEFT JOIN Resource
ON TimeSheet.weekdate BETWEEN Resource.fromweekdate AND Resource.toweekdate

This discussion is closed to new replies.