Kbase P62550: SQL: Is it possible to use an SQL reserved words in a query statement?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  20/11/2009 |
|
Status: Verified
GOAL:
SQL: Is it possible to use an SQL reserved words in a query statement?
GOAL:
How to use an SQL reserved words in SQL queries?
GOAL:
How to avoid the "Syntax error (7587)" when a field or a table name in the SQL query is an SQL reserved word?
GOAL:
How to avoid error (7587) when the SQL query must use SQL reserved words?
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
FIX:
The "Syntax error (7587)" is generated if when an SQL query using SQL reserved words is executed.
For example, each of the following two statements will generate the syntax error because the words "area" and "number" are SQL reserved words:
SELECT * FROM pub.area
INSERT INTO pub.customer ("number") VALUES (1)
It is possible to use SQL reserved words in an SQL query as long as the reserved words are enclosed in double quotation marks.
For example, the above two SQL statements will execute error free if we double quote the "area" and "number" SQL reserved words as follows:
SELECT * FROM pub."area"
INSERT INTO pub.customer ("number") VALUES (1)