Merge Two Queries Into One (1 Viewer)

rfear

Registered User.
Local time
Today, 20:49
Joined
Dec 15, 2004
Messages
83
I want to merge two queries into one ( see attachment ).

I've unioned queries before but only when one field has matched. This problem needs to match 2 fields.

Basically I want all the fields in NEWQRY_SUMRATES but only the fields Resource Whole and Availability from NEWQRY_DAYSBOOKED where Yr and Wk in NEWQRY_DAYSBOOKED match Yr and Wk in NEWQRY_SUMRATES.

Rich.
 

Attachments

  • NEWQRY_DAYSBOOKED.pdf
    3.2 KB · Views: 457

Rabbie

Super Moderator
Local time
Today, 20:49
Joined
Jul 10, 2007
Messages
5,906
Use the Query design grid to build what you want. Just click on the links between the fields to select all records from NEWQRY_SUMRATES and only records where there is a match from NEWQRY_DAYSBOOKED.

This should create an OUTER(Either LEFT or RIGHT)join between the tables when you look at the SQL source for the query.
 

rfear

Registered User.
Local time
Today, 20:49
Joined
Dec 15, 2004
Messages
83
Cool, worked a treat. Thanks.
 

Rabbie

Super Moderator
Local time
Today, 20:49
Joined
Jul 10, 2007
Messages
5,906
Glad to have been of help
 

Users who are viewing this thread

Top Bottom