• Thanks. I confirmed with my boss and he said it cannot be done as you suggest.

    So any other suggestion to the original question?

    Lowell (11/12/2012)


    ok, let me twist the question around on you...

    why can't you update all the rows at the same time, where WIN is null, and ts_started is less than an hour, regardless of which userID?

    UPDATE AGS_Hands_InProcess

    SET Win = 5,-- the value from the matching Adjustement

    ts = GETDATE() -- the timestamp of last action on this hand

    WHERE WIn IS NULL -- unfinished games

    AND ts_started < DATEADD(hh, -1, GETDATE()) -- older than 1 hour