Consultor Eletrônico



Kbase P108448: SELECT statement not retrieving the corect results
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/2/2005
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.0B

SYMPTOM(s):

SELECT statement not retrieving the corect results

SELECT contains OR related where clauses

One where clause contains EXISTS

CAUSE:

Bug# 20050829-004

FIX:

The workaround is to use UNION with the SELECT statement like in:
SELECT custNum from pub.customer where custNum < 10
UNION SELECT custNum FROM pub.customer
WHERE EXISTS( SELECT custNum FROM PUB.order where PUB.order.custNum = PUB.customer.custNum );
The offended statement is:
SELECT custNum FROM PUB.customer WHERE custNum < 10 OR EXISTS ( SELECT custNum FROM order WHERE order.CustNum = customer.custNum )