1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to implement NOT EXISTS in OPEN QUERY statement in PROGRESS 4GL - OpenEdge 10.2A

Discussão em 'StackOverflow' iniciado por fdantas, Novembro 13, 2020.

  1. fdantas

    fdantas Administrator Moderador

    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:

    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:

    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:

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


    it gives an error message

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


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

    Continue reading...

Compartilhe esta Página