![]() Verify that the correct fields are matched by reviewing the text in the Matching fields box. ![]() To follow the example, select ID from the Products table and Product ID from the Order Details table. You can choose only one field from each table. On the third page, select the fields that relate the tables, click, and then click Next. To follow the example, select the Order Details table. On the second page, select the table that is related, and then click Next. For example, if you want to see a list of Northwind products that have never been sold, select the Products table. On the first page of the wizard, select the table that has unmatched records, and then click Next. In the New Query dialog box, double-click Find Unmatched Query Wizard. One the Create tab, in the Queries group, click Query Wizard. Under Local Templates, click Northwind 2007 sample, and then click Create.įollow the directions on the Northwind Traders page (on the Startup Screen object tab) to open the database, and then close the Login Dialog window. Note: Examples in this article use a database that was created by using the Northwind database template.ĭepending upon your Access version, you can search for Northwind in the Search box, or in the left pane, under Template Categories, click Local Templates. You can often approach the problem of overlapping, redundant, or conflicting information by looking for duplicate data in two or more tables.įor more information about union queries, or about finding, hiding, or eliminating duplicate data, click the links in the See Also section. If you are comfortable writing Structured Query Language (SQL) statements, you might even prefer to forgo the Find Unmatched Query Wizard, and write the union query by hand. You can run the Find Unmatched Query Wizard to identify unmatched records, but if you want to retrieve the combined set of records, you use the results to create a union query. If this is your circumstance, the methods described in this article can help, but you will probably have further steps to take. To consolidate the tables, you must first determine which records are unique to one table or to the other table. The tables are nearly identical, but one table or both tables contain some records that the other is missing. You have two tables that have overlapping, redundant, or conflicting information, and you want to consolidate them into one table.įor example, suppose that you have one table named Customers and another table named Clients. If you want to review a list of things from the first table for which there are no corresponding actions in the second table, you can use a Find Unmatched Query. ![]() ![]() You must compare the two tables to determine which products have never sold. This information is also not possible to determine by looking at the Order Details table alone, because the Order Details table includes data only about products that have been sold. Because (by design) there is no data about orders in the Products table, it is not possible, by looking at the Products table alone, to determine which products have never been sold. You use one table to store data about a thing (such as a product), and another table to store data about actions (such as orders) that involve that thing.įor example, in the Northwind database template, data about products is stored in the Products table, and data about which products are included in each order is stored in the Order Details table. This article only covers finding unmatched records. Depending on your circumstance, finding unmatched records may be the first of several steps that you want to take. The following are two common circumstances in which you may want to compare two tables and find unmatched records. Use the Find Unmatched Query Wizard to compare two tablesĬreate and modify a Find Unmatched Query to compare by more than one fieldĬreate your own query to find unmatched records When should I search for unmatched records? This article shows you how to start and run the Find Unmatched Query Wizard, how to modify the wizard output, and how to create your own query to find unmatched records. You can also create your own query to find unmatched records, without using the wizard. After the wizard builds your query, you can modify the query's design to add or remove fields, or to add joins between the two tables (to indicate fields whose values should match). The easiest way to identify these records is by using the Find Unmatched Query Wizard. Sometimes you may want to compare two tables and identify records in one of the tables that have no corresponding records in the other table.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |