set identity_insert DisposableGoodsIdentification on IF OBJECT_ID('IdentificationOfDisposableGoods', 'U') IS NOT NULL insert into DisposableGoodsIdentification (id,amount,conclusion,disposableGoodsBatchID,disposableGoodsID,disposableGoodsStockID,entryDate,identification,price,warehouseID,warehouseName,batch_id) (select id,amount,conclusion,disposableGoodsBatchID,disposableGoodsID,disposableGoodsStockID,entryDate,identification,price,warehouseID,warehouseName,batch_id from IdentificationOfDisposableGoods) set identity_insert DisposableGoodsIdentification off update MaterialCheckRecord set takeStockDate=date;