Consultor Eletrônico



Kbase P97706: Getting Oracle error -911 when the WHERE clause contains a logical array
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/06/2005
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.0B
Oracle DataServer

SYMPTOM(s):

Getting Oracle error -911 when the Where clause contains a logical array

ORACLE error -911 "See ORACLE Error Messages and Code Manuals" (1252)

** Invalid character

Using a variable to reference to the element of the array

It works fine if the element is referenced by an integer instead

CAUSE:

Bug# 20041117-002

CAUSE:

The SQL query sent to Oracle is not correct. Actually, the field is not properly referred in the SQL query. It should be referred as field##<Element number> instead of field.
For example, if the WHERE clause applies to the 2 elements of the array, it sends field=value instead of field##2=value.


FIX:

Apply the Service Pack 10.0B02

If applying the Service Pack is not possible, there are 2 ways to work around this problem:
1- Do not use a variable to refer to an element in a array.
For example, instead of:
DEFINE VARIABLE x AS INTEGER NO-UNDO.

x = 2.

FIND FIRST table WHERE Field1 = "Progress" AND
Field2[x] = TRUE.
rather use:
FIND FIRST table WHERE Field1 = "Progress" AND
Field2[2] = TRUE.
2- Place the logical array field just after the WHERE clause in order to be the first field:
DEFINE VARIABLE x AS INTEGER NO-UNDO.

x = 2.
FIND FIRST table WHERE Field2[x] = TRUE AND
Field1 = "Progress" .