Consultor Eletrônico



Kbase P152524: SQL query does not return data
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/02/2010
Status: Unverified

SYMPTOM(s):

SQL query does not return data

SQL query contains equality comparison between two fields, equality comparison between field and character constant, and IS NULL comparison.

FACT(s) (Environment):

Records satisfying the query are known to exist.
Removing IS NULL comparison from query returns expected results.
Removing comparison to character constant from query returns expected results.
Replacing either equality comparison with two inequalities (<= and >=) returns expected results.
Applying LTRIM or RTRIM function to the field that is compared with the character constant returns expected results.
No leading blanks are visible in character field when trim functions are not applied and results are viewed in DB Navigator.
Two fields compared are character fields.
Field compared to NULL is a DATE field.
Same results with ODBC or JDBC.
Windows
OpenEdge 10.2A

CHANGE:

Upgrade from Progress 9.1E to OpenEdge 10.2A

CAUSE:

Bug# OE00190823

CAUSE:


SQL engine handles IS NULL incorrectly when IS NULL can be a join predicate.

FIX:

Upgrade to OpenEdge 10.2B. As a workaround if upgrading is not possible, try restating the query by replacing any equality comparison with two inequalities (<= and >=) or applying the LTRIM or RTRIM function to a field. These workarounds will not change the meaning of the query, but they may cause the SQL engine to bypass the problem code. They are not guaranteed to work for any particular query. There may be other restatements of any particular query that will avoid the problem code. The only way to determine if a workaround is possible in any particular case is by experimenting with different forms of the query.