服务热线:022-26677809 , 13821206318
坚守“用户之友”的初心,做“专业的奋斗者”,始终坚持“持续创新”
首页 > 知识库 > 正文

发货明细表功能错误

- 浏览:1584 - 发布时间:2008-04-27 20:24:00.0
问题版本: 1-通2005 问题模块: 1-总账
所属行业: 0-通用 问题状态: 1-UU通注册用户
关 键 字: 发货明细表 适用产品:
补 丁 号: 开放状态: 0-UU通注册用户
原问题号: 提交时间: 2008-4-27 20:24:00
问题名称: 发货明细表功能错误
问题现象: 发货明细表(按存货查询)不能输出
原因分析: 可能是数据库中各表之间有错误
解决方案: 执行脚本: Begin Declare @cItemName varchar(20) Set @cItemName = (Select cItemName from userDef Where cID = '01') If @cItemName Is Null update rpt_flddef set Name = '自定义项1' where Expression = 'cDefine1' And Id In (Select ID From Rpt_GlbDEF Where SystemID = 'SA' And Name In ('发货明细表(货物)', '发货明细表(部门)', '发货明细表(客户)', '发货明细表(业务员)', '发货明细表(仓库)')) else update rpt_flddef set Name = @cItemName where Expression = 'cDefine1' And Id In (Select ID From Rpt_GlbDEF Where SystemID = 'SA' And Name In ('发货明细表(货物)', '发货明细表(部门)', '发货明细表(客户)', '发货明细表(业务员)', '发货明细表(仓库)')) Set @cItemName = (Select cItemName from userDef Where cID = '02') If @cItemName Is Null update rpt_flddef set Name = '自定义项2' where Expression = 'cDefine2' And Id In (Select ID From Rpt_GlbDEF Where SystemID = 'SA' And Name In ('发货明细表(货物)', '发货明细表(部门)', '发货明细表(客户)', '发货明细表(业务员)', '发货明细表(仓库)')) else update rpt_flddef set Name = @cItemName where Expression = 'cDefine2' And Id In (Select ID From Rpt_GlbDEF Where SystemID = 'SA' And Name In ('发货明细表(货物)', '发货明细表(部门)', '发货明细表(客户)', '发货明细表(业务员)', '发货明细表(仓库)')) end --重新排序 Begin Declare @ID_Field int Declare @iOrderEx int Set @iOrderEx = 0 Declare Fld_Cur Cursor For Select ID_Field from Rpt_FldDEF Where Id = 1362 And ModeEx = 0 order by OrderEx Open Fld_cur Fetch Next FROM Fld_Cur Into @ID_Field WHILE @@FETCH_STATUS = 0 Begin Set @iOrderEx = @iOrderEx + 1 Update Rpt_FldDef Set OrderEx = @iOrderEx Where Id = 1362 And ModeEx = 0 And ID_Field = @ID_Field Fetch Next FROM Fld_Cur Into @ID_Field End CLOSE Fld_Cur DEALLOCATE Fld_Cur DELETE FROM Rpt_FldDEF Where Id = 1362 And ModeEx = 0 And Expression = 'cDefine22' End