解决方案: |
您好! 1、上集团ftp上查看数据上传情况,并无所说的‘20050429.rar’; 2、数据提交必须由分公司维护部二线经理提交; 请核查后按流程上报数据问题,谢谢配合。广东-固定资产 您好 经跟踪发现,问题原因: fa_total表的数据iperiod排序有问题造成的,个别数据原因造成的问题,不再出补丁解决,请使用此程序脚本解决。 该脚本只是改了一个排序的问题,并自己保存好,只用于此客户,请勿给别的客户,谢谢。 如有疑问请及时联系。 附脚本:(851A) if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[fa_Q_ZZ]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[fa_Q_ZZ] GO Create PROC fa_Q_ZZ(@sTypeNum varchar(50), @sDeptNum varchar(50)) AS --------------------------- Create #fa_Q_ZZ_Pre1 --------------- -- TO YTC: fa_Total - iPeriod 字段不能正常排序问题! 2005-04-30 SELECT Top 1 '0' AS sSort, 0 AS sPeriod, 0 AS dblAddValueOfSum, 0 AS dblDecValueOfSum, Sum(fa_Total.dblMonthValue) AS dblBalance, 0 AS dblTransOutDeprT, 0 AS dblTransInDeprT, Sum(fa_Total.dblMonthDeprTotal) AS dblDeprT, (Sum(fa_Total.dblMonthValue)-Sum(fa_Total.dblMonthDeprTotal)) AS dblNetValue INTO #fa_Q_ZZ_PreBegin FROM fa_Total WHERE (((fa_Total.sDeptNum) Like @sDeptNum + '%') AND ((fa_Total.sTypeNum) Like @sTypeNum + '%')) GROUP BY fa_Total.iPeriod ORDER BY fa_Total.iPeriod --------------------------- Create #fa_Q_ZZ_Pre1 --------------- -- SELECT Top 1 '0' AS sSort, 0 AS sPeriod, 0 AS dblAddValueOfSum, 0 AS dblDecValueOfSum, -- Sum(fa_Total.dblMonthValue) AS dblBalance, 0 AS dblTransOutDeprT, 0 AS dblTransInDeprT, -- Sum(fa_Total.dblMonthDeprTotal) AS dblDeprT, -- (Sum(fa_Total.dblMonthValue)-Sum(fa_Total.dblMonthDeprTotal)) AS dblNetValue -- INTO #fa_Q_ZZ_Pre1 -- FROM fa_Total -- WHERE (((fa_Total.sDeptNum) Like @sDeptNum + '%') AND ((fa_Total.sTypeNum) Like @sTypeNum + '%')) -- GROUP BY fa_Total.iPeriod SELECT sSort, sPeriod, dblAddValueOfSum, dblDecValueOfSum, dblBalance, dblTransOutDeprT, dblTransInDeprT, dblDeprT,dblNetValue INTO #fa_Q_ZZ_Pre1 FROM #fa_Q_ZZ_PreBegin ------------------------------------- UNION SELECT '1' AS sSort, fa_Total.iPeriod AS sPeriod, Sum(fa_Total.dblAddValue) AS dblAddValueOfSum, Sum(fa_Total.dblDecValue) AS dblDecValueOfSum, Sum(fa_Total.dblValue) AS dblBalance, Sum(fa_Total.dblTransOutDeprTotal) AS dblTransOutDeprT, Sum([dblTransInDeprTotal]+[dblDepr]) AS dblTransInDeprT , Sum(fa_Total.dblDeprTotal) AS dblDeprT, (Sum(fa_Total.dblValue)- Sum(fa_Total.dblDeprTotal)) AS dblNetValue FROM fa_Total WHERE (((fa_Total.sDeptNum) Like @sDeptNum + '%') AND ((fa_Total.sTypeNum) Like @sTypeNum + '%') AND ((fa_Total.iPeriod)<=[iPeriod])) GROUP BY fa_Total.iPeriod UNION 后面的没变,由于语句内容太多,放不下,所以删除。 |