Query merging into one field

G

Guest

I have a set of seven tables that list portions of our workforce. Employee
IDs appear in these files when the mainframe has a problem importing their
data. An employee ID may appear in one or more of these seven tables.

I want to perform a query that merges all of the error table information
together, resulting in a single result that shows all the errors from the
mainframe.

All the tables have the same primary key, the employee ID number.

What is the best way to merge this data so that all of the error results end
up in one query output?

Thanks,

Scott
 
G

Guest

Create a Union query. Use that table with the most fields in the first line
of the SQL. Organized the field listing of the other table to match how you
want them displayed in the columns that will be generated from the first
table.
Something like this --
SELECT Union1.XX, Union1.YY
FROM Union1
UNION SELECT [Union-X].[XX], [Union-X].[ZZ]
FROM [Union-X];
 

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

Top