You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7 lines
537 B
7 lines
537 B
CREATE DEFINER=`root`@`%` PROCEDURE `pro_daily_report_clear`()
|
|
BEGIN
|
|
-- 清理所有数据为0的记录
|
|
DELETE FROM `daily_report` WHERE `stock_total`=0 AND `stock_subtotal`=0 AND `simpleOrder_month`=0 AND `saleOrder_subtotal_month`=0 AND `saleOrder_waitVeh_total`=0 AND `sale_subtotal_year`=0 AND `deliver_subtotal_year`=0 AND `manufacturer_invoicing_year`=0 AND `buyout_year`=0 AND `arrears_carry_veh_count`=0 AND `loan_not_count`=0 and saleAllToThree = 0;
|
|
-- 删除临时表中数据
|
|
DELETE FROM daily_report_temp;
|
|
END
|