Skip to content

Instantly share code, notes, and snippets.

@MarkPryceMaherMSFT
Created April 7, 2022 00:44
Show Gist options
  • Save MarkPryceMaherMSFT/ead8807dd54807aea91e4f1c1188bfc2 to your computer and use it in GitHub Desktop.
Save MarkPryceMaherMSFT/ead8807dd54807aea91e4f1c1188bfc2 to your computer and use it in GitHub Desktop.
Wait for it
Create PROC [dbo].[wait_for] @seconds [bigint] AS
begin
declare @quit bit = 0;
declare @ConpareDateTime datetime2;
set @ConpareDateTime = dateadd(s, @seconds, getdate() )
while(@quit=0)
begin
if getdate() > @ConpareDateTime
set @quit = 1;
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment