【问】便利店8 机构价格表数据缺失 |
【适用版本】便利店8 |
【模块】基础业务 |
【点击数】33 |
【知识编号】72017121300002 |
|
|
【问题描述】部分商品只有商品资料,机构价格表信息缺失,导致相关报表查询数据异常。 |
【答】 |
请备份数据库,执行以下语句:use Storev8goinsert into t_pc_branch_price(branch_no, item_no, supcust_no, sale_way, price, base_price, sale_price, vip_price, sup_ly_rate, branch_price, branch_sale,com_flag, item_stock, base_price1, base_price2, base_price3, base_price4, status)select b.branch_no,item_no,main_supcust,item_sup_flag,(case b.trade_type when ‘2’ then a.trans_price else a.price end),base_price,sale_price, vip_price,sup_ly_rate,branch_price,’1′,com_flag,item_stock,base_price1,base_price2,base_price3,base_price4,isnull(a.status,’1′)from t_bd_item_info a, t_bd_branch_info b where b.property in (‘0′,’1’)and not exists (select 1 from t_pc_branch_price c where c.branch_no = b.branch_no and c.item_no = a.item_no)go |
|