On Tue, Aug 5, 2014 at 6:03 PM, Ron Thomas <[email protected]> wrote: > Ok The current date is one of the fields in the where clause. There are few > others too. Let me know if there is any other way to handle ?. Thanks. >
This really should be on the DB2-L list. "But that's not important." (Airplane!) You didn't show the WHERE clause. So I must try to guess. I'll guess that the WHERE uses the CURRENT_DATE special register. E.g. WHERE some-var = CURRENT_DATE . The "somv-var" is a DATE field in each row of the table. You might get away with a WHERE clause like: WHERE some-var = CAST(CURRENT_TIMESTAMP - 5 HOURS AS DATE) . Hopefully the previous expression is obvious in intent. But it basically sets the "current DATE" to start at 05:00:00 and end at 04:59:59.999999 on the "next" day. So, as long as the job runs on or after 05:00:00 of day "n" and strictly before 05:00:00 of day "n+1", then the WHERE will be TRUE for day "n". Wish I were a better communicator. It may be nasty to say, but I find it puzzling that this is not blatantly obvious to whomever is responsible for crafting your SQL queries. Unless, of course, there is more to this than has been revealed as yet. Again: POST THE SQL! It will make things much easier. Redact the names if they are somehow "proprietary" or "not to be revealed under pain of pain". -- There is nothing more pleasant than traveling and meeting new people! Genghis Khan Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
