I have a table which takes order called ORDER
I need to create a update trigger which fires when a user X makes a transaction else ignore and continue and sleep for n seconds
for update
as
declare @lastuu varchar(6)
declare @orderid decimal(10)
select @lastuu = [last_upd_user] FROM INSERTED
select @orderid = [order_id] FROM INSERTED
if @lastuu='TM_DEV' -- check user value on for Transaction
begin
Update TS_ORDER
set last_upd_date=getdate()
where order_id=@orderid
end
How do I create a timer?
develop a timer on this and/or a method of updating only when the time is every n seconds