How to calculate yesterday records with today records using progress 4gl?

Thiru

I have written a program and i need to calculate yesterday records(timing 12:00 AM to 05:00 AM) with today records

for each womf_worder of sfcf_au_ship where 
         womf_worder.word_production_status EQ "B"                      and 
         womf_worder.word_build_date        EQ today - 1                and 
         womf_worder.word_build_time        GE tt_shift.shft_start_hour and
         womf_worder.word_build_time        LE tt_shift.shft_stop_hour  
         no-lock: 

    assign i = i + 1.
end.

But the problem is I need to calculate the orders only on those mentioned time(12:00 AM to 05:00 AM) with today records. Could you please help this case?

Jeff Grande

If you know your data doesn't have 'future' dates in it, you could use something like this:

for each womf_worder of sfcf_au_ship where 
         womf_worder.word_production_status EQ "B"                      and 
         womf_worder.word_build_date        GE today - 1                and 
         womf_worder.word_build_time        GE tt_shift.shft_start_hour and
         womf_worder.word_build_time        LE tt_shift.shft_stop_hour  
         no-lock: 

  assign i = i + 1.
end.

If you are not familiar with the data you are working with or want it to be more portable:

for each womf_worder of sfcf_au_ship where 
         womf_worder.word_production_status EQ "B"                      and 
         womf_worder.word_build_time        GE tt_shift.shft_start_hour and
         womf_worder.word_build_time        LE tt_shift.shft_stop_hour  and
         ( womf_worder.word_build_date      eq today - 1                or
           womf_worder.word_build_date      eq today                       )
         no-lock: 

  assign i = i + 1.
end.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to match a records in progress 4GL?

get records of today, yesterday and this week

how to add and display specific records from code_mstr to temp-table in progress 4gl?

How to test if string is numeric using Progress 4GL

progress 4gl query for export count of records in all table available in db

Having a problem finding those records between yesterday and today based on a UTC column value using PostgreSQL

how can we group 5 pm yesterday to 5 pm today records to todays date

sql query to get today new records compared with yesterday

Progress 4GL - get today + 1 day

SELECT records that were not yesterday

How do I call the procedure section from window application using asynchronous method on progress 4GL?

Progress 4GL: How to generate different log file name when multiple processes using the same Timestamp?

How to read a XML file and export an item using Progress 4GL

How to increase the performance for a module running parallely (using asynchronous method) in Progress 4gl Appserver?

Progress Database 4GL - Math calculate for export file

Filter records submitted today in SQLite using SQLAlchemy

How to calculate space for number of records

How to calculate total amount of table records using jquery?

How to fetch sequelize js records for today

MySQL - How to find records for yesterday when timestamp is part of date

How to get all records from Yesterday's date in Firestore Flutter?

How to fill in missing records based on yesterday's information on SQL?

All MySQL records from yesterday

Unable to connect to db using -pf in openEdge progress 4gl

How to 'group by' using variables in 4gl

How to list all lines in a field with Progress 4GL

How to hide form fields data? - PROGRESS 4GL?

How to store the data in database in chinese language on progress 4gl?

How to converts a character to decimal on progress 4GL?