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