Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB2 equivalent of WAITFOR and SLEEP

Status
Not open for further replies.

vmmdesai

Programmer
Aug 7, 2002
4
IN
In SQL Server, the function WAITFOR instructs SQL Server to wait until the specified amount of time has passed
In Oracle SLEEP function can be used to get a similar behavior.

Is there any equivalent function in DB2?
If not is there any special reason that DB2 has not provided a support for these functions?
Thanks a lot!
-Vijay
 
Hi There

The answer to you question is all the sleep type functions are built on procedual language added to the database basic ansi SQL.

ie transac sql for sql server and plsql for oracles.

In DB2 if you want to do anything procedual eg loops if's you have to write it in a third party language eg jave, .cmd, rexx, shell scripts and those will contain the waits / sleeps you are after.

Hope this helps
 
Thanks a lot. The DB2 MTK does provide a java function to wait or sleep.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top