@dzhai
2017-09-25T15:41:26.000000Z
字数 1238
阅读 1127
中驰车福
-- 查询未分类
SELECT b.id,d.`product_id`,e.id
FROM tra_invoice_detail b
INNER JOIN `tra_order` c ON b.`SOURCE_ID`=c.`code`
INNER JOIN `goo_goods` d ON d.id=c.`GOODS_ID`
LEFT JOIN b2bexv32.`goo_goods_taxcode_mapping` e ON d.`product_id`=e.`PRODUCT_ID`
WHERE e.id IS NULL AND b.`INVOICE_ID`=1709251431493959
-- 查询分类信息
SELECT id,CODE,NAME FROM b2bexv32.`goo_product` WHERE id IN (1708071524572475,1708211148250515)
TRUNCATE TABLE sys_qeegoo_task_jiyajian_1;
INSERT INTO sys_qeegoo_task_jiyajian_1 SELECT id,10,1 FROM ods_db.goo_goods_jyj WHERE STATUS=9 AND goods_tag=1 AND show_tag=1 AND MOD(id,5)=0 ;
TRUNCATE TABLE sys_qeegoo_task_jiyajian_2;
INSERT INTO sys_qeegoo_task_jiyajian_2 SELECT id,10,1 FROM ods_db.goo_goods_jyj WHERE STATUS=9 AND goods_tag=1 AND show_tag=1 AND MOD(id,5)=1 ;
TRUNCATE TABLE sys_qeegoo_task_jiyajian_3;
INSERT INTO sys_qeegoo_task_jiyajian_3 SELECT id,10,1 FROM ods_db.goo_goods_jyj WHERE STATUS=9 AND goods_tag=1 AND show_tag=1 AND MOD(id,5)=2 ;
TRUNCATE TABLE sys_qeegoo_task_jiyajian_4;
INSERT INTO sys_qeegoo_task_jiyajian_4 SELECT id,10,1 FROM ods_db.goo_goods_jyj WHERE STATUS=9 AND goods_tag=1 AND show_tag=1 AND MOD(id,5)=3 ;
TRUNCATE TABLE sys_qeegoo_task_jiyajian_5;
INSERT INTO sys_qeegoo_task_jiyajian_5 SELECT id,10,1 FROM ods_db.goo_goods_jyj WHERE STATUS=9 AND goods_tag=1 AND show_tag=1 AND MOD(id,5)=4 ;
在此输入正文