How to Find the Unmatched Record

PVD causes reduction of blood canada pharmacy tadalafil flow to the penile area. You can buy this medicine from an online viagra 100mg tablet http://cute-n-tiny.com/tag/doughnut/ store allows people to simply answer a few questions and then order the medicine that contains sildenafil as its chief component. People across the globe buy this drug, either through levitra canada online pharmacies also. It has essential nutrients and high quality herbs to boost blood circulation, as it demanded in the muscles. cheap viagra india


How to Find the Unmatched Records using Query Wizard

We can find the unmatched records using a Find Unmatched Query Wizard.  The query will display only the records on the first table, but not on the second table. In this example, I will show how to find a customer that doesn’t have an order. I have a Customer table and Order table that related by the CustomerID. Some customers still don’t have any order in the Order table, so I want to get a list of those customers.

Step #1 Click a Query Wizard from a Create Menu to open a Query Wizard window.

create-menu

Step #2 Select Find Unmatched Query Wizard then click OK to open the Find Unmatched Query Wizard window.

select-find-unmatch-query

Step #3 Select tbl_Customer table then click next (If using Query, click on Queries radio button then select query from the list). Click Next>

select-product-table



Step #4 Select Orders table then click Next>

select-second-table

Step #5 Select a matching field name on both tables. Select Customer_ID field from tbl_Customer table list and select CutomerID field from Orders table on the right side then click <=>. Click Next > button.

unmatching-field-on-both-tables

Step #6 Select fields that you want to show on your query and move them to the right hand side box. You can select many fields as you want. Click Next > button.

select-fields-to-display

Step #6 Type a name of your new query or leave it as suggested by program as tbl_Customer Without Matching Orders. Click Finish button to view the result.

name-unmatch-query


It will display a result of tbl_Customer Without Matching Orders query. Per example below, you will find six customers from customer table that do not have any order on the Orders table.

open-unmatch-query

Per Orders table, there are seven orders that ordered by seven customers. These customers are not the same customers from the query list above.

customer-with-order

Query Design View

Under the query design view, you will see two tables are connected to each other by the arrow from tbl_Customer to Orders table. It also use the criteria where CustomerID from Orders is null (blank).

query-design

SQL View

Under the SQL view of this query, you will see two tables are connected by using LEFT JOIN (tbl_Customer LEFT JOIN Order ON tbl_Customer.[Customer_ID] = Orders.[CustomerID]).

SELECT tbl_Customer.Customer_ID, tbl_Customer.Customer_Last_Name, 
tbl_Customer.Customer_First_Name, tbl_Customer.Street_Address, tbl_Customer.City, 
tbl_Customer.State, tbl_Customer.Zip, tbl_Customer.Customer_Phone
FROM tbl_Customer LEFT JOIN Orders ON tbl_Customer.[Customer_ID] = Orders.[CustomerID]
WHERE (((Orders.CustomerID) Is Null));




Related posts