INSERT INTO code_masters set code_type_id=20, code_number=2, disp_name="予備", disp_sort=3, j_name="予備", e_name=NULL, invalid_flag_code=0;
UPDATE warehouses set own_flag_code=2 where id=706;
DELETE FROM products WHERE id IN (374,375,376,377,378,379,380,381,382,383);
UPDATE code_masters SET disp_name="在庫移動", j_name="在庫移動" WHERE id IN (97,117,120);
#これだけ非マスター
UPDATE sanix_production.sale_details SET quantity=1 WHERE product_id IN (374,375,376,377,378,379,380,381,382,383) AND price >= 0;
UPDATE sanix_production.sale_details SET quantity=-1, price=(price*-1) WHERE product_id IN (374,375,376,377,378,379,380,381,382,383) AND price < 0;
UPDATE sanix_production.sale_details SET product_id = NULL WHERE product_id IN (374,375,376,377,378,379,380,381,382,383);
UPDATE sanix_production.sale_details SET ubd=NULL where ubd="0000-00-00";
#BO分がubd="0000-00-00"になっているため
UPDATE sanix_production.shipping_details SET ubd=NULL where ubd="0000-00-00";