SQL Query Pause

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ilearneditonline
    Recognized Expert New Member
    • Jul 2007
    • 130

    SQL Query Pause

    I have 2 insert statements that I have to run at the end of a stored procedure.

    But I need to pause for 5 seconds between the first and the second. Is there any way to do this?
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Originally posted by ilearneditonlin e
    I have 2 insert statements that I have to run at the end of a stored procedure.

    But I need to pause for 5 seconds between the first and the second. Is there any way to do this?
    try the WAITFOR command

    Code:
    WAITFOR 
    {
        DELAY 'time_to_pass' 
      | TIME 'time_to_execute' 
      | ( receive_statement ) [ , TIMEOUT timeout ]
    }

    Comment

    • ilearneditonline
      Recognized Expert New Member
      • Jul 2007
      • 130

      #3
      Originally posted by ck9663
      try the WAITFOR command

      Code:
      WAITFOR 
      {
      DELAY 'time_to_pass' 
      | TIME 'time_to_execute' 
      | ( receive_statement ) [ , TIMEOUT timeout ]
      }
      Great. This fixed my issue. Anyone else looking at this, the MS LINK

      Comment

      Working...