Home Forums SQL Server 7,2000 T-SQL How to make a SP stop automaticaly after s.time? RE: How to make a SP stop automaticaly after s.time?

  • Hi,

    Sorry I haven't had time to test it, but the following maybe along the lines of what you need.

    --------------------------------------

    declare @startdate datetime

    set @startdate = getdate()

    .

    .

    .

    if @startdate = datediff(mi, @startdate, getdate()) + n /*where n is the number of minutes you wish to timeout after*/

    return

    --------------------------------------

    Hope this helps.

    Ritch

    *I didn't do anything it just got complicated*


    "I didn't do anything it just got complicated" - M Edwards