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

query 1

Status
Not open for further replies.

JUSTINRODDA

Programmer
Jul 17, 2002
2
US
Does anyone know how to query two tables and have a the answer be anything that is different between the two tables. I've got two tables that are identical except the second has some additional records. All I need is those additional records on the second table. Any help would be appriciated, thanks.

 
To put it in a question...
What is in table 2 and not in table 1?

Q=Query

Table2.db | Fld1 |
| Check _join1! |

Table1.db | Fld1 |
| _join1, count=0 |

EndQuery

This query would give you what records are in table 2 but not in table 1.

 
God bless you! That works. We waisted many o' hours trying to figure this out. I ran across this in the help files but it wasn't explained real well and I think I originally had it backwards but now it works great. Thank you.
 
Build a query. Here are all the steps- don't mean to affend you that already know this!
1. Select the first table you want.
2 Add the second table to the query.
3. Join the primary link in both tables:
a. Put cursor in the link field of table one.
b. Press F5 key.
b. Type "yuch".
c. Put cursor in the link field of table two.
d. Type "not "
d. Press F5 key.
e. Type "yuch"
4. Select all fields in table two, by 'checking' the leftmost box for table two.

That's it.
bcindc rconwayarl@aol.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top