I have a report that is running a query to pull data for the previous 7 days, as shown below in the WHERE clause:
This is always run on Sunday morning currently....but I need to be able to run it any day of the week and have it always pull from the previous week (Sunday through Saturday). This is pulling from an Informix database, but forums for Informix are sparse indeed and DB2 is the closest. Can anyone help me set this query up?
Thanks!
Code:
AND rpt.act_ingate_dtm > TODAY - INTERVAL(7) DAY TO DAY
AND rpt.act_ingate_dtm < TODAY
This is always run on Sunday morning currently....but I need to be able to run it any day of the week and have it always pull from the previous week (Sunday through Saturday). This is pulling from an Informix database, but forums for Informix are sparse indeed and DB2 is the closest. Can anyone help me set this query up?
Thanks!