Consultor Eletrônico



Kbase P119860: Syntax error when using Arrays with SQL-92
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/3/2009
Status: Verified

SYMPTOM(s):

Syntax error when using Arrays with SQL-92

SQL code containing Array references that ran with SQL-89 don't run with SQL-92

FACT(s) (Environment):

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

CAUSE:

The syntax for referencing Arrays in SQL-92 is different to what was used in SQL-89.

FIX:

Pre-10.1A, you need to use the PRO_ELEMENT function. For example, to return the 4th element of the MonthQuota array:

SELECT RepName, PRO_ELEMENT(MonthQuota,4,4) FROM pub.salesrep;
In 10.1A onward, Progress has added functionality so that you are now able to use the MonthQuota[4] style syntax for array elements, however you are not able to use this notation with inserts or updates. If you wish to perform inserts or updates, you will need to use the PRO_ELEMENT function. Below is an example of the new array notation:

SELECT RepName, MonthQuota[4] FROM pub.salesrep;