The information in this article applies to:
SUMMARYThe UNION clause is used to join the results of multiple queries. However, the UNION clause is not supported by the Relational Query By Example (RQBE) tool because the RQBE tool does not support multiple or nested queries. Therefore, to perform queries of this type, the SELECT statement must be coded by hand. MORE INFORMATIONThe UNION clause is a very important clause in the SELECT statement because it allows you to append the results of a query to the results of another query. The syntax is: UNION [ALL] <SELECT statement>The ALL clause prevents UNION from eliminating duplicate rows from the combined results of the tables. NOTE: There is no limit to the number of UNION clauses that can be used, except that the whole SELECT statement is limited to 2048 characters. There are three rules you need to follow when using a UNION clause. They are as follows:
To create a placeholder for a memo field:
The resulting query will have a blank memo field as the last field for each
record. This behavior occurs because there is not a join condition for the
databases, which creates a Cartesian product. In other words, each record
in the first table is matched with each record in the second table.
For another example of the UNION clause, please see the following article in the Microsoft Knowledge Base: Q89181 Outer Join Syntax Example for SELECT-SQL Statement REFERENCES
FoxPro "Language Reference," see "SELECT-SQL"
Additional query words: VFoxWin FoxUnix FoxMac FoxDos FoxWin SQL outer join combine outerjoin 2.50 2.50a 2.50b 2.50c
Keywords : FxtoolRqbe |
Last Reviewed: August 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |