Count down from 0 to 5 seconds and repeat [closed]Reducing high VLF countCan SQL Server 2008 R2 extended events execute stored procedure or query?sp_GetAppLock slow performance unusual behaviourQuery for total downtime of site using datestamps and status columnsImproving a DbGeography queryAdding columns from joined table slows down query incrediblyPerformance issue with sp_executesql and VARCHAR parameterEXECUTE AS USER = 'dbo' - The user does not have permission to perform this actionWhy does this query take so long to execute?How can I use Count() or Sum() with advanced criteria such as matching the most recent rows where a condition is true?

Why do we use the Greek letter μ (Mu) to denote population mean or expected value in probability and statistics

How could a sequence of random dates be generated, given year interval?

How to apply a macro for every single matching pattern

Is dark matter inside galaxies different from dark matter in intergalactic space?

Proof that if covariance is zero then there is no linear relationship

Why are the Ukraine related congressional hearings behind closed doors?

Why did Grima shed a tear?

In Cura, can I make my top and bottom layer be all perimiters?

If a tournament advertises G/30, can either player demand G/25 d5?

Alias to open a graphical Program (nautilus) opens it in Terminal too

Command which removes data left side of ";" (semicolon) on each row

Doubt on finding simplex's initial canonical tableau (II Phase)

How does AT-AT deploy troops?

Why are bagpipes tuned using just intonation?

Remove vertical space in gather enviroment

Novel in which space traders train a spearman army for a decaying medieval empire

What's a good strategy for offering low on a house?

We know someone is scrying on us. Is there anything we can do about it?

Sci-fi book trilogy about space travel & 'jacking'

More elegant way to express ((x == a and y == b) or (x == b and y == a))?

Starting a fire in a cold planet that has full of flammable gas

What's the most profitable use for an elemental transmuter?

Protecting Seals from Forgery

Why does the SR-71 Blackbird sometimes have dents in the nose?



Count down from 0 to 5 seconds and repeat [closed]


Reducing high VLF countCan SQL Server 2008 R2 extended events execute stored procedure or query?sp_GetAppLock slow performance unusual behaviourQuery for total downtime of site using datestamps and status columnsImproving a DbGeography queryAdding columns from joined table slows down query incrediblyPerformance issue with sp_executesql and VARCHAR parameterEXECUTE AS USER = 'dbo' - The user does not have permission to perform this actionWhy does this query take so long to execute?How can I use Count() or Sum() with advanced criteria such as matching the most recent rows where a condition is true?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









2

















What query can I use to trigger a count down from 0 to 5 seconds whenever executed? When I execute a query the output has to be 0 second to 5 second and once 5 seconds are done again it should go back to 0. When I execute again it should start from 0 to 5 seconds. Is it possible to achieve something like this using sql query?










share|improve this question
















closed as unclear what you're asking by Marcello Miorelli, Colin 't Hart, Andriy M, Marco, mustaccio Jun 3 at 14:36


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • 1





    Can I just clarify, do you want to output a count after each second, or just simply wait for 5 seconds. You say the "output" has to be 0 to 5 seconds

    – George.Palacios
    May 31 at 14:44






  • 2





    It's unclear what you're actually hoping to achieve here. Certainly, you don't want to just show a countdown on the screen or waste CPU cycles. What are you going to do with this countdown? Other tools are probably more appropriate than a database for them.

    – jpmc26
    Jun 1 at 9:38











  • "Count down from 0 to 5"? Do you mean 0, 1, 2, 3, 4, 5 or 5, 4, 3, 2, 1, 0?

    – John Eisbrener
    Jun 3 at 13:26

















2

















What query can I use to trigger a count down from 0 to 5 seconds whenever executed? When I execute a query the output has to be 0 second to 5 second and once 5 seconds are done again it should go back to 0. When I execute again it should start from 0 to 5 seconds. Is it possible to achieve something like this using sql query?










share|improve this question
















closed as unclear what you're asking by Marcello Miorelli, Colin 't Hart, Andriy M, Marco, mustaccio Jun 3 at 14:36


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • 1





    Can I just clarify, do you want to output a count after each second, or just simply wait for 5 seconds. You say the "output" has to be 0 to 5 seconds

    – George.Palacios
    May 31 at 14:44






  • 2





    It's unclear what you're actually hoping to achieve here. Certainly, you don't want to just show a countdown on the screen or waste CPU cycles. What are you going to do with this countdown? Other tools are probably more appropriate than a database for them.

    – jpmc26
    Jun 1 at 9:38











  • "Count down from 0 to 5"? Do you mean 0, 1, 2, 3, 4, 5 or 5, 4, 3, 2, 1, 0?

    – John Eisbrener
    Jun 3 at 13:26













2












2








2


1






What query can I use to trigger a count down from 0 to 5 seconds whenever executed? When I execute a query the output has to be 0 second to 5 second and once 5 seconds are done again it should go back to 0. When I execute again it should start from 0 to 5 seconds. Is it possible to achieve something like this using sql query?










share|improve this question















What query can I use to trigger a count down from 0 to 5 seconds whenever executed? When I execute a query the output has to be 0 second to 5 second and once 5 seconds are done again it should go back to 0. When I execute again it should start from 0 to 5 seconds. Is it possible to achieve something like this using sql query?







sql-server






share|improve this question














share|improve this question











share|improve this question




share|improve this question










asked May 31 at 14:37









svisveshsvisvesh

192 bronze badges




192 bronze badges





closed as unclear what you're asking by Marcello Miorelli, Colin 't Hart, Andriy M, Marco, mustaccio Jun 3 at 14:36


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











closed as unclear what you're asking by Marcello Miorelli, Colin 't Hart, Andriy M, Marco, mustaccio Jun 3 at 14:36


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as unclear what you're asking by Marcello Miorelli, Colin 't Hart, Andriy M, Marco, mustaccio Jun 3 at 14:36


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









  • 1





    Can I just clarify, do you want to output a count after each second, or just simply wait for 5 seconds. You say the "output" has to be 0 to 5 seconds

    – George.Palacios
    May 31 at 14:44






  • 2





    It's unclear what you're actually hoping to achieve here. Certainly, you don't want to just show a countdown on the screen or waste CPU cycles. What are you going to do with this countdown? Other tools are probably more appropriate than a database for them.

    – jpmc26
    Jun 1 at 9:38











  • "Count down from 0 to 5"? Do you mean 0, 1, 2, 3, 4, 5 or 5, 4, 3, 2, 1, 0?

    – John Eisbrener
    Jun 3 at 13:26












  • 1





    Can I just clarify, do you want to output a count after each second, or just simply wait for 5 seconds. You say the "output" has to be 0 to 5 seconds

    – George.Palacios
    May 31 at 14:44






  • 2





    It's unclear what you're actually hoping to achieve here. Certainly, you don't want to just show a countdown on the screen or waste CPU cycles. What are you going to do with this countdown? Other tools are probably more appropriate than a database for them.

    – jpmc26
    Jun 1 at 9:38











  • "Count down from 0 to 5"? Do you mean 0, 1, 2, 3, 4, 5 or 5, 4, 3, 2, 1, 0?

    – John Eisbrener
    Jun 3 at 13:26







1




1





Can I just clarify, do you want to output a count after each second, or just simply wait for 5 seconds. You say the "output" has to be 0 to 5 seconds

– George.Palacios
May 31 at 14:44





Can I just clarify, do you want to output a count after each second, or just simply wait for 5 seconds. You say the "output" has to be 0 to 5 seconds

– George.Palacios
May 31 at 14:44




2




2





It's unclear what you're actually hoping to achieve here. Certainly, you don't want to just show a countdown on the screen or waste CPU cycles. What are you going to do with this countdown? Other tools are probably more appropriate than a database for them.

– jpmc26
Jun 1 at 9:38





It's unclear what you're actually hoping to achieve here. Certainly, you don't want to just show a countdown on the screen or waste CPU cycles. What are you going to do with this countdown? Other tools are probably more appropriate than a database for them.

– jpmc26
Jun 1 at 9:38













"Count down from 0 to 5"? Do you mean 0, 1, 2, 3, 4, 5 or 5, 4, 3, 2, 1, 0?

– John Eisbrener
Jun 3 at 13:26





"Count down from 0 to 5"? Do you mean 0, 1, 2, 3, 4, 5 or 5, 4, 3, 2, 1, 0?

– John Eisbrener
Jun 3 at 13:26










2 Answers
2






active

oldest

votes


















7


















WaitFor should help you accomplish this.



In your case we can simply pass a DELAY time as below



WAITFOR DELAY '00:00:05';


This will simply wait for 5 seconds, then return to the caller.






share|improve this answer

































    6


















    Have you looked into the waitfor delay command? See below example



    while 1=1
    begin
    --do something
    waitfor delay '00:00:05'
    end





    share|improve this answer

































      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      7


















      WaitFor should help you accomplish this.



      In your case we can simply pass a DELAY time as below



      WAITFOR DELAY '00:00:05';


      This will simply wait for 5 seconds, then return to the caller.






      share|improve this answer






























        7


















        WaitFor should help you accomplish this.



        In your case we can simply pass a DELAY time as below



        WAITFOR DELAY '00:00:05';


        This will simply wait for 5 seconds, then return to the caller.






        share|improve this answer




























          7














          7










          7









          WaitFor should help you accomplish this.



          In your case we can simply pass a DELAY time as below



          WAITFOR DELAY '00:00:05';


          This will simply wait for 5 seconds, then return to the caller.






          share|improve this answer














          WaitFor should help you accomplish this.



          In your case we can simply pass a DELAY time as below



          WAITFOR DELAY '00:00:05';


          This will simply wait for 5 seconds, then return to the caller.







          share|improve this answer













          share|improve this answer




          share|improve this answer










          answered May 31 at 14:41









          George.PalaciosGeorge.Palacios

          4,69512 silver badges37 bronze badges




          4,69512 silver badges37 bronze badges


























              6


















              Have you looked into the waitfor delay command? See below example



              while 1=1
              begin
              --do something
              waitfor delay '00:00:05'
              end





              share|improve this answer






























                6


















                Have you looked into the waitfor delay command? See below example



                while 1=1
                begin
                --do something
                waitfor delay '00:00:05'
                end





                share|improve this answer




























                  6














                  6










                  6









                  Have you looked into the waitfor delay command? See below example



                  while 1=1
                  begin
                  --do something
                  waitfor delay '00:00:05'
                  end





                  share|improve this answer














                  Have you looked into the waitfor delay command? See below example



                  while 1=1
                  begin
                  --do something
                  waitfor delay '00:00:05'
                  end






                  share|improve this answer













                  share|improve this answer




                  share|improve this answer










                  answered May 31 at 14:40









                  kevinnwhatkevinnwhat

                  1,2221 gold badge1 silver badge11 bronze badges




                  1,2221 gold badge1 silver badge11 bronze badges
















                      Popular posts from this blog

                      Tamil (spriik) Luke uk diar | Nawigatjuun

                      Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                      Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?