[Stackoverflow] [Progress OpenEdge ABL] How to implement NOT EXISTS in OPEN QUERY statement in PROGRESS 4GL - OpenEdge 10.2A

Status
Not open for further replies.
A

aza

Guest
I want to create a browse such that it will show all the records from one table if the values of a field do NOT exist in another table.

It is possible to get the records using SQL as:

Code:
SELECT myField FROM pub.myTable WHERE 
NOT EXISTS (SELECT myField FROM pub.myTable2 WHERE myTable2.myField=myTable.myField)

It is also possible using 4GL as:

Code:
FOR EACH myTable WHERE 
NOT CAN-FIND(FIRST myTable2 WHERE myTable2.myField=myTable.myField)

The problem is when I put this query in a browse as:

Code:
OPEN QUERY myBrowse
FOR EACH myTable WHERE 
NOT CAN-FIND(FIRST myTable2 WHERE myTable2.myField=myTable.myField)

it gives an error message

Code:
CAN-FIND is invalid within an OPEN QUERY. (3541)

The question is, is it possible to write such an OPEN QUERY statement?

Continue reading...
 
Status
Not open for further replies.
Top