Q+E: Using Outer Join Operators to Include Nonmatching RecordsLast reviewed: November 2, 1994Article ID: Q76781 |
SUMMARYQ+E supports the use of Outer Join operators. These operators are used to display records that are normally excluded from the joined query because they do not match in both tables.
MORE INFORMATION
Outer Join Operators
Note: This example uses macro functions supplied by the add-in QE.XLA. You must open the QE.XLA before executing this example.
A1 =DB.LOGON('sqlserver') A2 =ACTIVATE("sheet1") A3 =DB.SQL.QUERY(2,"use pubs; select au_fname, au_lname, pub_name from sqlserver | authors, publishers where authors.city *= publishers.city",1,FALSE) A4 =RETURN()This macro will open two SQL Server tables and do a join on the "CITY" field of each table. Records in the table "authors" that do not have a match in the table "publishers" will be included in the result. It is not possible to include nonmatching records from both tables using the SQL operators.
REFERENCES"Q+E for Microsoft Excel User's Guide," version 3.0, pages 70 and 103 "Quick Reference Guide to SQL," Microsoft Press, pages 64-67
|
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |