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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combine 2 tables

Status
Not open for further replies.

EvilCabal

Programmer
Jul 11, 2002
206
CA
Hey, I need a query that take some control numbers and list the informations related to those number. Problem is info is in one table for some numbers and in another table for others (One table for valid numbers and one for cancelled) But I need all the info on the same query.

So

Table 1 contains the control no I want to list
Table 2 contains valid control no + piece no, date, etc.
Table 3 contains cancelle control no + piece no, date, etc

Is there any to make an 'intelligent' query that would take the info in the right table and put it all on the same datasheet? Combining the 2 tables is not an option they are too big, would take forever.

Note : The control No are either in table 2 OR table 3, never in both

Thank a lot!
 
make two queries qurey one
select * (or fields names) from table2
union select * (or fields names) from table3
query 2
put table1 and query1 in the query and join them on the control #
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top