The information in this article applies to:
SYMPTOMSIn Microsoft Query, you may receive an error message similar to one of the following when you run a Structured Query Language (SQL) SELECT statement from the Execute SQL dialog box where: <tablename> is the name of the table being used. <fieldname> is the field name. <aliasname> is the alias name for the field name. -or-
CAUSE
This behavior occurs because Microsoft Query has its own parse engine.
This parse engine processes SQL statements for database management systems
(DBMSs), or back-ends, that do not support certain SQL syntax. When you
run a query via the Execute SQL dialog box, it bypasses the Microsoft Query
parse engine and sends the SQL statement directly to the Open Database
Connectivity (ODBC) Driver Manager. If the ODBC Manager does not
understand the syntax of the SQL statement, it passes it on to the DBMS.
Database back-ends, such as Microsoft SQL Server, that can process SQL
statements in this manner will have no problem accepting them. However,
with other DBMS, such as dBASE, this situation will cause an error and you
must use the alternative method described in the "Resolution" section of
this article (below). RESOLUTION
To resolve this situation, use syntax similar to the following example when
you run a query from the Execute SQL dialog box:
MORE INFORMATION
Field name aliases let you provide a different name for a field heading.
For example, to return the CUSTMR_ID field from the CUSTOMER table as
"Customer Id," Microsoft Query creates a SELECT statement as follows:
NOTE: If you use this statement in the Execute SQL dialog box in Microsoft Query, you will receive the error messages described in the "Symptoms" section of this article. REFERENCES
For more information on creating a query using the Execute SQL command:
Additional query words:
Keywords : kbinterop kbtool xlquery |
Last Reviewed: July 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |