Consultor Eletrônico



Kbase P28890: Query does not return correct recordset with CONTAINS agains
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/2/2003
Status: Unverified

FACT(s) (Environment):

Progress 8.x

FACT(s) (Environment):

Progress 9.x

SYMPTOM(s):

Query does not return correct recordset with CONTAINS against a WORD-INDEXed field

FOR EACH <table> WHERE <field> CONTAINS "<phrase>"

Record not returned is delimiter is following by a numeric value

FOR EACH <table> WHERE <field> CONTAINS "abc"
"abc,xyz" is found
"abc,123" is not found

Using standard codepage (ISO8859-1)

Using BASIC database collation

CAUSE:

Comma is assigned the BEFORE_DIGIT attribute by default.

When the comma is followed by a character with the DIGIT attribute it is treated as part of a word.

"abc,xyz" is treated as 2 words
"abc,123" is treated as 1 word

FIX:

Use a different word delimiter.

For instance, a space could be used a breaking character.
"abc 123" would be found by the query listed above.