Hiya. I am working on a script to be run in query analyzer in which I want to test for a specific instance every x seconds. When I get one of the results I want, (Status is successful, failed, totally failed), I want to kick out of my loop. BUT - I want to see that it is still doing something in the meantime. I set the "Scroll results as received" check box, but that doesn't seem to do what I want.
This little script, as written, shows all the results after 5 seconds. I want to see the 'in progress' every one second, just a friendly reminder that it's still cranking. Any ideas?
This little script, as written, shows all the results after 5 seconds. I want to see the 'in progress' every one second, just a friendly reminder that it's still cranking. Any ideas?
Code:
declare @counter int
set @counter=0
while @counter < 5
begin
print 'in progress'
waitfor delay '00:00:01'
set @counter=@counter+1
end
print 'done!'