这是因为商品档案异常造成的,在数据库下列语句检查商品档案问题
nselect *from bi_t_item_info where item_clsno not in (select item_clsno from bi_t_item_cls) ---检查商品类别在类别档案中不存在
nselect *from bi_t_item_info where item_brand not in (select item_clsno from bi_t_item_cls) ---检查品牌在品牌档案里不存在
nselect *from bi_t_item_info where sup_no not in (select supcust_no from bi_t_supcust_info) ---检查供应商在供应商档案里不存在
select * from bi_t_item_info where unit_no='' or unit_no is null---没有单位
select * from bi_t_item_info where valid_days is null –-保质期为空
select * from bi_t_item_info where base_price is null --批发价为空
select * from bi_t_item_info where flag2<>'N' and item_subno is NUll --生鲜商品国际条码为空
然后根据查询到的结果去修改商品档案