insert into t_pc_branch_price (branch_no,item_no,price, base_price,sale_price,vip_price,com_flag)
Select b.branch_no,item_no,price, base_price,sale_price,vip_price,'0' From t_bd_item_info a,(select * from t_bd_branch_info where LEN(branch_no)=4) b Where b.property in ('0','1') And b.branch_no item_no not in (select c.branch_no c.item_no from t_pc_branch_price c
代码语言:javascript复制 where c.branch_no=b.branch_no and c.item_no = a.item_no)