Hello my friends:
Is it possible to run a select statement an wait, then run again until the table has no data?
The following is an example code:
BEGIN IF (SELECT COUNT(*) FROM MySchema.MyTable) > 1 BEGIN WAITFOR DELAY '00:00:5'; SELECT COUNT(*) FROM MySchema.MyTable; END END
I want to repeat the code above with the delay until the table count is zero.
Is this possible?
Thanks!