Q+E: Query to Return Records That Don't Have Match in 2nd FileLast reviewed: September 12, 1996Article ID: Q113633 |
The information in this article applies to:
SUMMARYIn Q+E, you can construct a query that will create a new file containing all the records from one file that do not have matching records in a second file. This type of query is called a subtract query.
MORE INFORMATION
Overview of Subtract Query ProcedureTo perform the subtract query, use the Outer Join command to join the two files, then add a condition to the end of the resulting SQL query text. Running this query results in a new file; the contents of the source and destination files are left unchanged. NOTE: The "Q+E User's Guide" uses the terms "source" and "destination" to refer to the two files being joined. The destination file is the file whose window is active when you choose the Outer Join command. In this procedure, the destination file is the file that contains the unmatched records. The example below uses the sample files that ship with Microsoft Excel version 4.0. The default location for these files is EXCEL\QE. If these files are not installed on your system, you must run a custom setup and reinstall Q+E.
Example of Subtract Query ProcedureWARNING: Your use or modification of the SQL statement provided in this article is at your own risk. Microsoft provides this SQL statement "as is" without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. Microsoft does not support modifications of the SQL statement to suit specific customer requirements.
Note that there are blank fields to the right, beginning with the INTERESTS field. To remove these fields, do either of the following:
REFERENCES"Q+E for Microsoft Excel User's Guide," version 3.0, Chapter 2 For more information about Outer Join, choose Index from the Help menu, and select the Select Commands Menu topic. Select the Outer Join topic.
|
KBCategory: kbtool kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |