IF (EXISTS(Select * from sys.systrigger where LCase(trigger_name) = LCase('Trig_SOL_Upd')))
THEN Drop trigger Trig_SOL_Upd
END IF

GO

create trigger Trig_SOL_Upd after update of Discount order 2 on DBA.SaleOrderLines
referencing old as DocOld new as DocNew
for each row
begin
  call CalcSaleTotal(DocOld.DocId)
end