Consultor Eletrônico



Kbase 19561: Function as a part of FIND,FOR EACH,OPEN QUERY WHERE clause
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/2/2000

SUMMARY:

You cannot use a user-defined function that contains a
FIND, FOR EACH or OPEN QUERY as part of a WHERE clause.
This works differently in versions 8.x and 9.x.
The behavior you see in 8.x is a bug.


STEP BY STEP DETAILS:

The following piece of code runs OK in 8.x but causes (7254) in 9.x:

FUNCTION salesrep RETURNS CHAR.
DEF BUFFER buf-salesrep FOR Salesrep.
FIND FIRST buf-salesrep NO-LOCK.
RETURN buf-salesrep.sales-rep.
END FUNCTION.

FIND FIRST customer WHERE customer.sales-rep = salesrep()
NO-LOCK NO-ERROR.

DISP customer.cust-num.


REFERENCES TO WRITTEN DOCUMENTATION:
--------------------------------------------------------------------

Kbase #19561