Union query

I

iwasinnihon

I am having difficulty creating the Query that I want. I have 2 tables
that share a single field with a 3rd table. I want to create a query
that will list all of the information from both tables without
combining the information. I want to only have one column for the
shared field. The problem that I am having is that it will combine the
information from the two table next to the shared field. I guess I am
trying to do a Union instead of a Join. How do you do this?

Sorry if this doesn't make sense. I am finding it difficult to explain
myself in writing.
 
J

John Vinson

I am having difficulty creating the Query that I want. I have 2 tables
that share a single field with a 3rd table. I want to create a query
that will list all of the information from both tables without
combining the information. I want to only have one column for the
shared field. The problem that I am having is that it will combine the
information from the two table next to the shared field. I guess I am
trying to do a Union instead of a Join. How do you do this?

Sorry if this doesn't make sense. I am finding it difficult to explain
myself in writing.

Since we cannot see your database, and know nothing about the
structure of the tables - nor the problem that you're having - it's
more than a bit difficult to answer.

You say you have three tables and you want to list all the information
from both tables. Both of three???

Could you give some SPECIFIC description - fieldnames, datatypes,
perhaps even sample data, and desired outcome?

John W. Vinson[MVP]
 
J

Jeff Boyce

Providing a real-world example might help...

What do you mean by "... without combining the information."?

What do you mean by "...combine the information from the two table next to
the shared field."?

If you want to do a UNION query, first create the two queries that get their
respective portions. Then open a new query and add NO tables or queries to
it. Change the view to SQL. Using the SQL statements of your two earlier
queries, your UNION query will look something like:

SELECT YourField1, ... FROM YourTable
UNION
SELECT YourOtherField1 FROM YourOtherTable;

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

UNION QUERY.. 3
Union Query help 7
Data Mismatch in Excel 2010 4
union query with "unique" and "is not null" values 1
Union Delete question 2
Union Order By SQL 2
Union Query 6
Union Query 2

Top