Consultor Eletrônico



Kbase P183415: Oracle DataServer does not handle * character as expected
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/11/2011
Status: Unverified

SYMPTOM(s):

Oracle DataServer does not handle * character as expected

FOR EACH myfile WHERE myfile.myfield BEGINS "*" returns all records as the * is replaced by the % which Oracle handles as a wild card

The expected return should be all myfile records where myfield has an asterisk (*) as the first character, so"*A" is a match, "^B" is NOT a match,"*C" is a match,"$*" is NOT a match, and so forth

Run for each myfile no-lock where not myfile begins "*".
On DB2 all the myfile records that do not have a * as the first character of that field are returned.
On Oracle it returns nothing because it assumes that * is a wildcard.

FACT(s) (Environment):

All Supported Operating Systems
IBM DB2 Universal Database
Oracle
OpenEdge 10.2B 64-bit
Oracle DataServer

CAUSE:

Oracle DataServer replaces * with an Oracle wild card character '%"

FIX:

Bug# OE00205477

FIX:

Currently, there is no way to resolve this without a code change:
Changing the main statement to for each myfile no-lock where not substr(myfile,1,1) = "*" is not a major issue but finding all the references via variables in the code is a daunting task.