不用触发器我执行‘select id,material_code,material_name,quantity,quantity_box,product_date,serial_code,stock_location from im_stoc k_serial’;
我执行上面的语句是有数据的,但是我用触发器写入的时候,在另外一个表对应写入quantity,quantity_box的kcsl,kcsl都是‘0.00’
下面是触发器的代码
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER trigger [dbo].[kc_insert]
on [dbo].[im_stock_serial]
for insert
as
begin
insert into [connect].[dbo].c_kc
select id,material_code,material_name,quantity,quantity_box,product_date,serial_code,stock_location from inserted
end
原表
触发后的表