Microsoft Office Tutorials and References
In Depth Information
Finding Duplicate Records
Note that you don’t have to use a wizard to create this kind of query. The
query shown in Figure 3-11 finds unmatched records in the Address Book
table by using an inner join between the tables and the Is Null criteria for
the related field in the table where matching records are stored. (For more
about inner joins, see Chapter 1 of this minibook.)
Figure 3-11:
Find
unmatched
records by
using an
inner join
and the
Is Null
criterion.
If you need to avoid unmatched records, define the relationship between the
tables to enforce referential integrity. Define referential integrity to avoid
creating orders for customers in the Orders table when you don’t have
contact information for them in the Address Book table. You may still find the
Find Unmatched Query Wizard to be useful, though. You may want to find
customers who haven’t placed any orders, for example, or products that
haven’t been ordered. (For more information on referential integrity, see
Book II, Chapter 6.)
Finding Duplicate Records
When a table contains hundreds or thousands of records, spotting
duplicates isn’t always easy, but the Find Duplicates Query Wizard can find them
in an instant. Before you use the wizard, though, you need to really think
about which combination of fields in a record constitutes a duplicate. In
a table of names and addresses, you wouldn’t necessarily consider two
records with the name Jones in the Last Name field to be duplicates,
because two different people in your table may have the last name Jones.
Not even the First Name and Last Name fields combined necessarily
pinpoint duplicate records, because more than one Joe Jones or Sarah
Jones can be in your table. On the other hand, if two or more records in
your table contain the same information in the Last Name, First Name,
Address1, and Zip Code fields, there’s a good chance that those records
are duplicates. You can use loose criteria to find duplicates, though, because
Search JabSto ::




Custom Search