Query for Two Tables

  • Thread starter Thread starter Sandra
  • Start date Start date
S

Sandra

Hello,

I have two tables in my DB. It's a membership DB. One
table is the Primary Members, the second is the Family
Members.

I'm trying to put together a query that joins these two
tables and lists all the members. If I have 5 primary
members and 10 family members, I'd like to see a result
of 15 members listed. Right now my results vary between
10 (only the family members listed) or 36 (the family
members are listed twice!!!)

Thanks for your help! I truly appreciate it!!

Sannas
 
As there is no obvious connection between thetwo tables, I
would recommend that you use a UNION query. Try something
along the lines of

SELECT nameCol1 FROM YourPrimaryMembersTable
UNION
SELECT nameCol2 FROM YourFamilyMembersTable

Alternatively, if the tables have the same design
structure, you should merge the two tables and add an extra
column that states whether the row relates to a Primary or
Family Member.

Hope This Helps
Gerald Stanley MCSD
 
Thanks for the input Gerald. I just may use that. There
is a connection between the two tables...MemberID field.
It's the key. I was considering an action query to merge
the two tables and then querying that table to get the
data I need. It seems the long way around considering
Access is a powerful tool. I'd be very surprised if
there wasn't a way to query from two tables that lists
the members from both tables at once.

Sannas
 
Back
Top