BUG: Alias with Same Name as Keyword in SELECT Causes ErrorLast reviewed: June 27, 1995Article ID: Q118489 |
The information in this article applies to:
SYMPTOMSIf a table has the same name as any of the keywords in a SELECT-SQL command (for example, NOCONSOLE, PLAIN, UNION, or GROUP) and the table's alias is referenced as the first field in the list of fields in a SELECT-SQL command, a "Syntax Error" message will occur.
RESOLUTIONTo avoid this problem, do one of the following:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce the ProblemIssue the following commands from the Command window:
CREATE TABLE union (name C(10), age N(5)) APPEND BLANK SELECT union.name FROM unionThis will produce the error message mentioned above. To avoid this error, issue the following command:
SELECT age, union.name FROM unionThis command does not produce the error because the field that references the table is not first in the list of fields. This behavior is similar to that described in article Q112308, which describes a problem that occurs only in FoxPro version 2.0. In FoxPro version 2.0, the error occurs when you use a keyword anywhere in the SELECT command as a table name. For more information about this problem, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q112308 TITLE : PRB: Reserved Words Invalid Table Names in FoxPro 2.0 SELECT |
Additional reference words: FoxMac FoxDos FoxWin 2.00 2.50 2.50a 2.50b 2.60
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |