Query merging into one field

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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];
 
Back
Top