Thursday, November 21, 2013

To get autorefresh resultset of Sql query

The following query does not full fill the requirements as it does not auto refresh 
the results. Each time it updates the screen with the new resultset.
 
 
 
 
SELECT GETDATE()              --your query to run
raiserror('',0,1) with nowait --to flush the buffer
waitfor delay '00:00:10'      --pause for 10 seconds
GO 5                          --loop 5 times
 
 
The above query will run  5 times, pausing for 10 seconds between each run.

No comments: