我有一个触发器,如下所示:
ALTER TRIGGER [dbo].[areftblSalesDoc] ON [dbo].[tblSalesDoc]
AFTER INSERT
AS
Begin Try
INSERT INTO ArefSms
(DSIDName, SalesID, CustName, CustCellPhone, Fish, qt, ProdName)
SELECT
td.DSName, i.SalesID, tc.CustName, tc.CustCellPhone, i.Fish, NULL, NULL
FROM inserted i
left join tblDistributionStationDesc td on i.DSID = td.DSID
left join tblCustomerDesc tc on i.CustomerID = tc.CustID
End Try
Begin Catch
End catch
当触发器不能保存任何东西并且有错误tblsalesdoc
时也不能保存。但我不想那样。
我能做些什么?