Consultor Eletrônico



Kbase P76621: Error (7587) running SQL-92 statement w Reserved Word.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   21/01/2008
Status: Unverified

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

SYMPTOM(s):

JDBC connection generates the error:

=== SQL Exception 1 ===
SQLState=42000
ErrorCode=-20003
[JDBC Progress Driver]:Syntax error (7587)

when running an SQL-92 SELECT statement similar to:

SELECT site.alpha, site.beta, site.uid from PUB.site;

ODBC connection generates the error:

[MERANT] [ODBC PROGRESS DRIVER] [PROGRESS] syntax error (7587) (-20003)

when running the same statement.

CAUSE:

The statement includes the SQL-92 reserved word 'UID'. Progress SQL-92 Reserved Words may not be used as field or table identifiers without being enclosed in double quotes.

FIX:

Enclose SQL-92 identifiers that are SQL-92 reserved words in double quotes:

SELECT site.alpha, site.beta, site."uid" from PUB.site