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

IF EXISTS(SELECT * FROM sys.columns WHERE Name = N'date' AND Object_ID = Object_ID(N'MaterialCheckRecord'))
update MaterialCheckRecord set takeStockDate=date;