﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / How To Get Timer Like Funcationality in SSMS to Auto execute a Query every N incremenets / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 19:47:38 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How To Get Timer Like Funcationality in SSMS to Auto execute a Query every N incremenets</title><link>http://www.sqlservercentral.com/Forums/Topic1378446-391-1.aspx</link><description>I was hoping for somethingbuilt-into SSMS like a query option or similiar but I will test both suggestions made.Thanks</description><pubDate>Tue, 13 Nov 2012 12:09:47 GMT</pubDate><dc:creator>YSLGuru</dc:creator></item><item><title>RE: How To Get Timer Like Funcationality in SSMS to Auto execute a Query every N incremenets</title><link>http://www.sqlservercentral.com/Forums/Topic1378446-391-1.aspx</link><description>Have you tried replacing the While loop with a GO N?[code="sql"]SELECT *FROM MyTablewaitfor delay '00:00:02'GO 5[/code]</description><pubDate>Mon, 29 Oct 2012 15:27:18 GMT</pubDate><dc:creator>Luis Cazares</dc:creator></item><item><title>RE: How To Get Timer Like Funcationality in SSMS to Auto execute a Query every N incremenets</title><link>http://www.sqlservercentral.com/Forums/Topic1378446-391-1.aspx</link><description>you can use a neat trick with RAISERROR to get an immediate result inside the loop, if that's what you want/need.a basic example:[code]--print error immediately in batchdeclare @i int,        @err varchar(100)--set @i=1while 0=0beginSET @err = 'Progress So Far: Step ' + convert(varchar(30),ISNULL(@i,1)) + ' completed.'raiserror (@err,0,1) with nowaitwaitfor delay '00:00:02'set @i=ISNULL(@i,1) + 1end[/code]</description><pubDate>Mon, 29 Oct 2012 14:02:18 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>How To Get Timer Like Funcationality in SSMS to Auto execute a Query every N incremenets</title><link>http://www.sqlservercentral.com/Forums/Topic1378446-391-1.aspx</link><description>Is there a way in SSMS 2008 to get a query to execute every N seconds with a Wait For X seconds so that the query waits a few seocnds before each execution?I have a query that I have to press F5 for very 15 seconds or so and it would great if I could get the thing to auto run every X seconds for a maximum number of execiutions or for a maximum duration.  I've managed to use the WIATFOR within a WHILE loop to do this but the query resulst are all shown after the Last executionj fo the loop and I'm trying to see the results as each execution of the query runs.The pseudocode would be something liike this:WHILE @iCOunter &amp;lt; 10 BEGIN  SELECT X FROM TABLE WHERE Conditions  SELECT @iCOunter = @iCOunter + 1ENDMake sense?  Is this kind of thing possible in SSMS?  Thanks</description><pubDate>Mon, 29 Oct 2012 13:53:02 GMT</pubDate><dc:creator>YSLGuru</dc:creator></item></channel></rss>