I need to extract data from a MS Sql table, but I want to do it only if there's a 'load completed' semaphore row in the table. In addition, I want to retry the job once every 15 minutes for one hour. If after an hour the row doesn't exist, I exit with a successful completion code.
If I do a 'before sql' query to see if the row exists, there's no mechanism to gracefully exit the stage/job...or maybe there is and I don't know it (which is entirely possible!).
How would you all execute this?
Thanks,
cbres00
Elegant way to stop a job when there's a row in a tbl?
Moderators: chulett, rschirm, roy
If it was me then I would create a job and select this into a hash file. I would write a routine to read this and return a different value if it found it.Call this routine in a sequence. Have links for each value returned. One to run the job another to sleep 15 minutes. You can do sleep in a routine.
Mamu Kim
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom