ANSI-92 reserved words generate the following error in queries when the check boxes under
SQL Server Compatibility Syntax (ANSI 92) are selected.
Reserved Error (-1001); There is no message for this error.
Back to the top
To avoid the error message, use one of the following workarounds.
Workaround 1| 1. | View the query in Design view. |
| 2. | Place brackets ([]) around the ANSI-92 reserved words. |
| 3. | Save the query. |
Workaround 2
When you design the tables in the database, be careful not to use ANSI-92 reserved words. If a table has a field already defined, consider changing the field name.
Workaround 3
Consider disabling the
SQL Server Compatibility Syntax (ANSI 92) option for the database. To disable the option:
| 1. | On the Tools menu, click Options. |
| 2. | Click the Tables/Queries tab. |
| 3. | Click to clear the check boxes under SQL Server Compatibility Syntax (ANSI 92). |
Back to the top
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Back to the top
The following is a list of ANSI 92 reserved words that are known to generate the error mentioned in the "Symptoms" section of this article.
| ABSOLUTE | ALLOCATE | ARE |
| AT | AUTHOZATION | BIT_LENGTH |
| BOTH | CASCADED | CAST |
| CATALOG | CHAR_LENGTH | CHARACTER_LENGTH |
| CLOSE | COALESCE | COLLATE |
| COLLATION | CONNECTION | CONTINUE |
| CORRESPONDING | CROSS | CURRENT |
| CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMP |
| CURRENT_USER | CURSOR | DEALLOCATE |
| DECLARE | DEFERRABLE | DEFERRED |
| DESCRIBE | DESCRIPTOR | DIAGNOSTICS |
| DISCONNECT | DOMAIN | END |
| END-EXEC | ESCAPE | EXCEPT |
| EXCEPTION | EXTERNAL | EXTRACT |
| FETCH | FOUND | FULL |
| GET | GLOBAL | GO |
| GOTO | IMMEDIATE | INDICATOR |
| INITIALLY | INPUT | INSENSITIVE |
| INTERSECT | INTERVAL | ISOLATION |
| LANGUAGE | LEADING | LOCAL |
| LOWER | MATCH | MODULE |
| NAMES | NATURAL | NEXT |
| NULL | OCTET_LENGTH | OF |
| ONLY | OPEN | OVERLAPS |
| PARTIAL | POSITION | PREPARE |
| PRESERVE | PRIOR | READ |
| RELATIVE | RESTRICT | ROWS |
| SCROLL | SECTION | SESSION |
| SESSION_USER | SIZE | SQL |
| SQLCODE | SQLERROR | SQLSTATE |
| SUBSTRING | SYSTEM_USER | TEMPORARY |
| THEN | TIMEZONE_HOUR | TIMEZONE_MINUTE |
| TRAILING | TRANSACTION | TRANSLATE |
| TRANSLATION | UNIQUE | UNKNOWN |
| UPPER | USAGE | USING |
| WHEN | WHENEVER | WRITE |
| ZONE | | |
Back to the top
Steps to Reproduce the Behavior
| 1. | Start Microsoft Access, and then open the sample database Northwinds.mdb. |
| 2. | Create the following table:
Table: Table1
----------------------------
Field Name: ID
Data Type: Autonumber
Indexed: Yes (No Duplicates)
Field Name: Language
Data Type: Text
Field Name: Location
Date Type: Text
Table Properties: Table1
------------------------
PrimaryKey: ID
|
| 3. | Save the new table as Table1, and then add one record to the table. |
| 4. | Close the Table1 table. |
| 5. | On the Tools menu, click Options. |
| 6. | Click the Tables/Queries tab. |
| 7. | Under SQL Server Compatibility Syntax (ANSI 92), click to select the This database check box. |
| 8. | Create a new query in Design view. |
| 9. | Close the Add Table dialog box without making any selection. |
| 10. | On the View menu, click SQL View. |
| 11. | In the SQL window, type the following SQL statement:
SELECT Language FROM Table1
|
| 12. | Try to run the query.
Note that you receive the error message that is mentioned in the "Symptoms" section of this article.
|
Back to the top