Consultor Eletrônico



Kbase P26725: Error (7520) when attempting to execute a SQL-92 query against a derived table
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/6/2009
Status: Verified

SYMPTOM(s):

Error (7520) when running a SELECT Statement against a derived table

=== SQL Exception 1 ===
SQLState=42S22
ErrorCode=-20006
[JDBC Progress Driver]:Column not found/specified (7520)

Using the SQL-92 engine

Example of query:
SELECT Name, City FROM (SELECT Name, City FROM pub.customer) A

FACT(s) (Environment):

Progress 9.x
All Supported Operating Systems

CAUSE:

Bug# OE00091161

FIX:

Upgrade to OpenEdge 10.0A or later. If upgrading to OpenEdge 10.0A or later is not feasible, then:
A workaround is to put the column list of the derived table in upper case letters after the derived table alias. For example:

SELECT Name, City FROM (SELECT Name, City FROM pub.customer) A (NAME, CITY)
Another workaround is to put double quotes around the names of the SELECT list and ensure that the column names are spelled exactly as they appear in the database schema.. For example:
SELECT "Name", "City" FROM (SELECT Name, City FROM pub.customer) A
A third workaround is to rewrite the query using derived table columns that differ from the parent table column names. For example:
Select col1 from ( select name as col1, city as col2, country as col3 from pub.customer) A
or
Select A.col1 from ( select name as col1, city as col2, country as col3 from pub.customer) A