Union Query???

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I have 2 tables with fields:
tblOne.oneID
tblOne.oneName

tblTwo.twoID
tblTwo.Name


I am trying to set source for a combo box that will list the Name field for:
1) All the records in tblOne
2) Only the records in tblTwo with ID that is NOT in tblOne.

I tried Union Query but that gives me all the records in both tables. tblOne
has several thousand records; tblTwo would have no more than 100 or so .
tblTwo is used for Pending actions that could include either a brand new
record to be added to tblOne (would have new ID) or some modification to
record that already exists in tblOne (tblTwo ID would be copied over).

Any suggestions would be more than gratefully accepted. Thank you.
 
You're close...instead of using table two as one of the tables in the query,
create a query that selects only the unmatched records (there's a wizard to
help you), and combine the query with table one.

HTH

--
Rebecca Riordan, MVP

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
 
Back
Top