Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Union Query to combine another table

Status
Not open for further replies.

aarondewberry

IS-IT--Management
Jul 20, 2005
148
GB
All

I current have this union query to give me all the results of these identical tables.

What I want to do is add one last table to the query, but...
The last table [tblPreNRC] has all the same fields as the other tables, but also has two additional fields.

All i want to see in this query from the last table are the fields that match the other tables. The two additional fields are not needed in this query.

Any ideas how to finish this SQL?

Select * From [Worktracking Amec]
UNION ALL
Select * From [Worktracking Enterprise]
UNION ALL
Select * From [Worktracking Browns North London]
UNION ALL
Select * From [Worktracking Docwra Clancy]
UNION ALL
Select * From [Worktracking Docwra North London]
UNION ALL
Select * From [Worktracking Comm Proj - Self Lay]
 
You can specify the fields to be included:

[tt]UNION ALL
Select FieldA, FieldB, ..., FieldZ From [Worktracking Comm Proj - Self Lay][/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top