Share this Page URL

Chapter 9. Extending Your Use of Queries > Using Outer Joins and Self-Joins - Pg. 328

Extending Your Use of Queries SELECT DISTINCT Customers.City, Customers.Country FROM Customers ORDER BY Customers.City; 328 Unique Records Property The Unique Records property pertains only to append, make-table, and select queries that include more than one table. It affects all the fields in the data sources included in a query, not just the set of fields that are included in the query itself. (Setting the Unique Records property to Yes in the Cus- tomerCities query--a single table query--returns the same set of records as would be returned if the property were set to No, because each record in the table is unique.) You can't set both Unique Values and Unique Records to Yes at the same time (although both properties can be set to No). Just the Steps Set query properties 1. 2. 3. Open the query in Design view. Right-click in the Query window above the query design grid, and then click Properties. In the Query Properties dialog box, set the values for the properties you need to change. Using Outer Joins and Self-Joins In the multitable queries we've examined earlier in this chapter and in Chapter 6, the query's results have been retrieved by using an inner join. An inner join selects records with matching values in the fields that join the tables. A standard example of an inner join is a query that selects records by