问题现象: | 完工产品日报表在取数时,执行结果错误:在关键字“INSERT”附件有语法错误。 请给出一个处理的思路,谢谢。 |
问题原因: | |
解决方案: | 您好: 可能是入库单录入的存货编码和各自由项的组合和存货档案上不匹配,请检查入库单及存货档案数据。 可以使用如下SQL语句检查数据不匹配的情况,根据查询结果修改入库单自由项数据,或补录存货档案自由项物料信息。 select distinct rd.cCode 入库单号,rds.cInvCode 存货编码,rds.cFree1,rds.cFree2,rds.cFree3,rds.cFree4,rds.cFree5,rds.cFree6,rds.cFree7,rds.cFree8,rds.cFree9,rds.cFree10 from rdrecords10 rds inner join inventory i on rds.cinvcode =i.cinvcode left join rdrecord10 rd on rd.ID=rds.ID left join v_st_mom_orderdetail mom_d on rds.iMPoIds=mom_d.MoDId and isnull(rds.brelated,0)=isnull(mom_d.byproductflag,0) left join bas_part B on B.InvCode=rds.cInvCode and (isnull(B.Free1,N'')=N'' or rds.cFree1=B.Free1) and (isnull(B.Free2,N'')=N'' or rds.cFree2=B.Free2) and (isnull(B.Free3,N'')=N'' or rds.cFree3=B.Free3) and (isnull(B.Free4,N'')=N'' or rds.cFree4=B.Free4) and (isnull(B.Free5,N'')=N'' or rds.cFree5=B.Free5) and (isnull(B.Free6,N'')=N'' or rds.cFree6=B.Free6) and (isnull(B.Free7,N'')=N'' or rds.cFree7=B.Free7) and (isnull(B.Free8,N'')=N'' or rds.cFree8=B.Free8) and (isnull(B.Free9,N'')=N'' or rds.cFree9=B.Free9) and (isnull(B.Free10,N'')=N'' or rds.cFree10=B.Free10) where cRDCode in ( '-1','12' ) and B.PartId is null 如有问题,请及时邮件反馈。 |
相关补丁: | |
版本: | U8 V10.0 |
模块: | 成本管理 |
产品: | 管理会计 |
问题名称: | 【双百项目】完工产品日报表在取数时错误 |
最后更新: | 2012-01-03 23:56:20 |