Consultor Eletrônico



Kbase P106414: Oracle data server applies double upper functions to a field in OpenEdge 10.0x
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/16/2010
Status: Verified

SYMPTOM(s):

Oracle data server applies double upper functions to a field in OpenEdge 10.0x

No syntax error is generated from Oracle

FACT(s) (Environment):

Oracle data server applies double upper functions to a field
The field is the right operant of equality comparison
Oracle is doing a full table scan with double upper statements
The full table scan is impacting performance
All Supported Operating Systems
Oracle DataServer
OpenEdge 10.0x
Oracle 9i

CAUSE:

Bug# OE00117964

CAUSE:

The problem is that the compiler is performing two upper assignments.
1. When the left operand is marked uppercase in the dictionary and the right operand is subsequently marked with the UPPER function to make the equality operation match in uppercase.
2. Later, when the right operand is evaluated by the compiler, it is indiscriminantly applying the UPPER function if that operand also happens to be marked case-insensitive in the dictionary.

FIX:

Upgrade to 10.0B03 or later.


If the upgrade is not possible, switching operants works around the problem:
FOR EACH table1 WHERE table1.field1 = "A"
AND table1.field2 = "A" NO-LOCK
,EACH table2 WHERE table2.field1 = FALSE
AND ttable1.field3 = table2.field2
AND table.field3 BEGINS "a" NO-LOCK
BY table2.field3
BY table2.field4
BY ttable2.field5:
LEAVE.
END.