Union Query Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. I am very new to access, and I want to copy data from multiple tables
into one table, based on criteria and such. I have tried an append query,
and I do not think that it will work.

I have many tables, but these are those that are involved:
- Departments: which has an autonumber Department ID, Department Name, and a
dealer code (from a Dealer table one-to-many)
- Temp: which has a Dealer Code and staff name, etc. Temp is unrelated to
any other table.
This is the one that I need to be filled:
- Staff: which has an autonumber Staff ID, the one-to-many Department ID
from Departments, and names, etc.

Each dealer code has three entries in the "Departments" table. What I want
to do is fill in the Staff table from previously created and filled tables.

However, the problem is that I need to get the correct Department ID
autonumber for each entry in the Staff table. The logic in this is that I
need the "Dealer Code" from the Department table and temp table to match AND
I need the Department Name from the Department table to be "Parts" (so it
just selects 1 of the 3 departments for each dealer).

When that happens, I want a sort of "merge" with that Department ID and the
information from the Temp table. I am thinking right now that I have to do
some type of Union query or inner join, both of which I have no idea how to
do.

Is what I want to do even possible, and if so, can someone provide a bit of
guidance? (I do not know SQL at all, so I think it I attempted to do
something like this it would be very messy).

Thanks!
 
once again, solved my problem. (linking tables, then select query)

is there a way to delete posts?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Using form to fill in query criteria not working 2
Union Query 3
Query Difficulty 9
help me 2
Issues with Left Join 1
rolling up data from 4 similar tables 6
Not In (sort of) query 1
Using "and" in a query 2

Back
Top