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 add a date condition to for each loop in Progress 4GL query?

Discussão em 'StackOverflow' iniciado por fdantas, Outubro 6, 2017.

  1. fdantas

    fdantas Administrator Moderador

    I have difficulties with a query I have to change to limit the data I export from a Progress database. I export "myorderdate" to a text file. However, I have to limit the data to only orders after year 2012.

    OUTPUT STREAM s1 TO VALUE(exportFileStringDirectory).
    FOR EACH poTable NO-LOCK WHERE
    ponum = 1 AND
    /* this doesn't work -->*/
    /*myorderdate.YEAR >= DATE("2012").YEAR AND*/
    conum = 1:

    PUT STREAM s1 UNFORMATTED
    ISO-DATE(myorderdate)
    SKIP.
    END.
    OUTPUT STREAM s1 CLOSE.


    I'm new to Progress 4GL databases and work with databases altogether. All I have to do is a small change to the code so please forgive me if the description lacks some vital information.

    Continue reading...

Compartilhe esta Página