Search This Blog

Tuesday, April 10, 2012

how to implement wait in SQL function

it is known to us that we can't use the wait comment in sql function. but if we want to implement similar wait statement in function what to do then...

use bellow funda...

dec @starttime datetime

Set @starttime=getdate()

if (datediff(ss,@starttime,getdate)=20) -- 20 sec delay implemented
begin
--
---

END