Update Certain Field After 24 Hours


Main Menu        Computer Tips        Software Downloads Menu

  Main Question - Posted From Caleb:
Hello Experts, Let say I have the following in DB2: tblBooking (...,status, bookingTime) the bookingTime stores CURRENT TIMESTAMP when booking is made. I would like to update the 'status' field to some other value after the bookingTime has reached more than 48 hours. Im approach is to use trigger. But as for all I know, triggers are based on update, delete and insert events. How can accomplished this?

Guest Says:
You have to run a background task or program, a trigger is only going to do it when activate it. If you are in cics thats easy, just run a start task that will trigger the db2 table every so often or at least check timestamp greater then 24 hours, etc., as that would be easy to do. If you are in batch then just put something in the scheduler to run every so often that updates the timestamp greater then 24 horus (or any other time you wish to check). That would be simple to do, we do stuff like this in production all the time.


Add your reply below ...



This site allows you to ask questions and get answers from various posters, you may also answer any posts if you feel like you have input to give. Feel free to ask for help with any new question you wish, but most of the questions here are tech related. You will find many questions and answers related to your Ipod or Ipod Nano, Itunes, audio and video converting, spyware or adware cleanup, pc or other computer questions, and even mainframe questions. Although these are the tech questions most often asked, you will find help on almost any computer or software related subject. Feel free to go to the main menu and review the posts already present, or feel free to ask your own question. (Some questions will be closed once the moderator feels they are sufficiently answered and that no other input is needed).

Your Name:

Your Reply:

Type in verification code:


Main Menu

Shareware and Freeware Database

Tasks and Spyware Database

Various Computer Help Topics