update InventoryItem set inventorySerialNumber = (select dgs.inventorySerialNumber from DisposableGoodsStock dgs where dgs.id = InventoryItem.disposableGoodsStockId) where inventorySerialNumber is null;