Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
ALTER TRIGGER [scheme].[metauddel] ON [scheme].[opheadm] AFTER UPDATE AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; IF UPDATE (status) declare @Status char(1) declare @OrderNo char (10) declare @OrderLineNo char(1) declare @DateEntered datetime declare @Exist float select @Status = [status]from inserted with (NOLOCK) select @OrderNo = order_no from inserted with (NOLOCK) select @DateEntered = date_entered from inserted with (NOLOCK) if @Status = 9 Begin Insert into opdetm_audit (order_no,order_line_no,line_type,order_line_status,order_qty,despatched_qty,allocated_qty,val) Select order_no, order_line_no, line_type, order_line_status, order_qty, despatched_qty, allocated_qty, val from [scheme].[opdetm]with (NOLOCK) where order_no = @OrderNo and @DateEntered < CAST(FLOOR(CAST(GETDATE() AS FLOAT))AS DATETIME) End END
Join the community of 500,000 technology professionals and ask your questions.