Archives of the TeradataForum
Message Posted: Fri, 21 Oct 2005 @ 11:44:00 GMT
Subj: | | Re: Let me know how to incorporate dealy inside a procedure. |
|
From: | | Keith_kdb |
I did have an occasion recently to put a delay into a SP. We had a process that was run approx 2000 times per day, but each one needed to run
in isolation. The way I did it was to have a 'key', if a process could not get it, it waited for a period of time and tried again.
I achieved it by having a Repeat Loop:
Repeat
Set Cntr = Cntr + 1;
Until Cntr > 300000
It wasn't beautiful, wasted CPU, but it worked. (Though with hindsight I think I prefer some of the other delay options that have been
suggested!).
Keith.
|