----科脉智赢软件导档后在sql server中执行语句 use kmzy_v10 --把【kmzy_v10】改成安装建库的数据库名称 declare @Dataname varchar(30) declare @gyhid varchar(30) declare @jyfs varchar(20) use kmzy_v10 --把【kmzy_v10】改成安装建库的数据库名称 set @gyhid='010003' --填写要处理的供应商的编号,如:010001,只更改数字,符号不能去掉。 --select @gyhid select @jyfs=case (select check_out_flag from bi_t_supcust_info where supcust_no=@gyhid ) when 'A' then 'Y' when 'D' then 'K' when 'G' then 'S' when 'C' then 'D' else '供应商不存在' end --select len(@jyfs) if (len(@jyfs)) =1 begin select '开始处理编号为【' + @gyhid + '】的供应商的商品档案信息,请稍候......' as 数据处理开始 --select * from bi_t_item_info where sup_no=@gyhid --查询指定编号供应商的商品信息,以确认指定供应商是否存在。 update bi_t_item_info set display_flag='1' ,flag6='Y',flag7='Y',flag8='Y',in_rate=0,sale_rate=0,jf_flag='1' where sup_no=@gyhid ---此语句旨在处理导档后的档案标示及税率等信息,重点提示:**********更改除经营方式外的档案标志********** --select '供应商编号为【' + @gyhid + '】的商品档案标志信息更改完成' as 档案标志处理 update bi_t_item_info set flag2='Z' where LEN(item_subno)=5 and flag2 is null ---更改生鲜商品档案计价方式为空的商品的计价方式为秤重 update bi_t_item_info set flag2='N' where LEN(item_subno)<>5 and flag2 is null ---更改标品商品档案计价方式为空的商品的计价方式为普通 --select '供应商编号为【' + @gyhid + '】的商品档案计价方式更改完成' as 档案计价方式处理 if (LEN(@jyfs)=1) update bi_t_item_info set pool_flag=@jyfs where pool_flag is null and sup_no=@gyhid else select @jyfs --处理导档供应商相应商品的经营方式 --select '供应商编号为【' + @gyhid + '】的商品档案经营方式更改完成' as 档案经营方式处理 select '供应商编号为【' + @gyhid + '】的商品档案信息批量处理完成,请在软件档案信息中查看处理结果。' as 档案处理结果 end else select '供应商编号为【' + @gyhid + '】的'+@jyfs +',请检查录入是否正确或更改正确后再试......' as 档案处理结果 --select * from bi_t_supcust_info --select * from bi_t_item_info