{企业管理案例}用友公司案例不同月份的年初累计折旧和年初原值皆不同2

上传人:精****库 文档编号:140793077 上传时间:2020-08-01 格式:PPTX 页数:27 大小:208.54KB
返回 下载 相关 举报
{企业管理案例}用友公司案例不同月份的年初累计折旧和年初原值皆不同2_第1页
第1页 / 共27页
{企业管理案例}用友公司案例不同月份的年初累计折旧和年初原值皆不同2_第2页
第2页 / 共27页
{企业管理案例}用友公司案例不同月份的年初累计折旧和年初原值皆不同2_第3页
第3页 / 共27页
{企业管理案例}用友公司案例不同月份的年初累计折旧和年初原值皆不同2_第4页
第4页 / 共27页
{企业管理案例}用友公司案例不同月份的年初累计折旧和年初原值皆不同2_第5页
第5页 / 共27页
点击查看更多>>
资源描述

《{企业管理案例}用友公司案例不同月份的年初累计折旧和年初原值皆不同2》由会员分享,可在线阅读,更多相关《{企业管理案例}用友公司案例不同月份的年初累计折旧和年初原值皆不同2(27页珍藏版)》请在金锄头文库上搜索。

1、不同月份的年初累计折旧和年初原值皆不同,问题来源:(分公司) U8产品支持部杨天椿 2005年5月12日,现象,问题说明: 固定资产及累计折旧表(一),同一类别不同月份的年初累计折旧和 年初原值皆不同,1月是对,麻烦写条语句更新2-12月的年初累计折旧和年初原值等于1月,现象,固定资产及累计折旧表(一):一月份的年初原值:614369944.4 年初累计折旧的情况是一样的,不再分析:,现象,二月份的数据为:611929523.82,相差:2440420.58,分析过程,先分析界面看到的数据和数据库中的是否一致:可以看到数据是一致的,分析过程,使用的语句: select sum(dblyearv

2、alue),sum(dblyeardeprtotal) from fa_total where iperiod=1 select sum(dblyearvalue),sum(dblyeardeprtotal) from fa_total where iperiod=2,分析过程,分析是否存在不相等的数据: select * from ( select * from fa_total where iperiod=1 ) aa inner join ( select * from fa_total where iperiod=2 ) bb on aa.sdeptnum=bb.sdeptnum an

3、d aa.stypenum=bb.stypenum where aa.dblyearvaluebb.dblyearvalue,分析过程,查询结果是没有:,分析过程,再分析数据差异在哪里: select sum(aa.dblyearvalue),sum(aa.dblyeardeprtotal) from ( select * from fa_total where iperiod=1 -order by sdeptnum,stypenum ) aa left join ( select * from fa_total where iperiod=2 -order by sdeptnum,styp

4、enum ) bb on aa.sdeptnum=bb.sdeptnum and aa.stypenum=bb.stypenum where bb.dblyearvalue is null,分析过程,可以看到数据差异为:2440420.58=614369944.4-611929523.82,分析过程,查找差异的纪录: select aa.* from ( select * from fa_total where iperiod=1 ) aa left join ( select * from fa_total where iperiod=2 ) bb on aa.sdeptnum=bb.sde

5、ptnum and aa.stypenum=bb.stypenum where bb.dblyearvalue is null,分析过程,明细记录:,分析过程,问题原因找到了:问题是如何修改,很明显,数据表中丢失了或缺少了一些记录: 每个月都有此情况,且记录数不一样,如何才能改对?,分析过程,以二月份为例: select aa.* into #depr2 from ( select * from fa_total where iperiod=1 ) aa left join ( select * from fa_total where iperiod=2 ) bb on aa.sdeptnum

6、=bb.sdeptnum and aa.stypenum=bb.stypenum where bb.dblyearvalue is null,分析过程,update #depr2 set iperiod=2 ,lmonthcount=0,dbllastaccrualvalue=0,dbllastdepr=0,dbllastaddvalue=0,dbllastdecvalue=0, dblmonthvalue=0,dblvalue=0,dblmonthdeprtotal=0,dbldeprtotal=0,dbladdvalue=0,dbldecvalue=0,dbltransindeprtota

7、l=0, dbltransoutdeprtotal=0,dblaccrualvalue=0,dbldepr=0 insert into fa_total select * from #depr2,分析过程,其他月份类似修改: 2-12月份修改后,发现问题又来了: 发现有几个月份的数据还是有问题:,分析过程,查询发现数据不对:,分析过程,查询分析一下: select * from ( select * from fa_total where iperiod=1 ) aa inner join ( select * from fa_total where iperiod=6 ) bb on aa.

8、sdeptnum=bb.sdeptnum and aa.stypenum=bb.stypenum where aa.dblyearvaluebb.dblyearvalue,分析过程,可以看一下具体的差异记录:,解决方法,为零的数据肯定是错的,可以更新: update fa_total set fa_total.dblyearvalue=bb.dblyearvalue,fa_total.dblyeardeprtotal=bb.dblyeardeprtotal from fa_total inner join (select * from fa_total where iperiod=1 ) bb

9、 on fa_total.sdeptnum=bb.sdeptnum and fa_total.stypenum=bb.stypenum where ( fa_total.dblyearvaluebb.dblyearvalue) and fa_total.iperiod=6,分析过程,再分析: select aa.sdeptnum,aa.stypenum,aa.dblyearvalue,bb.dblyearvalue from ( select * from fa_total where iperiod=1 ) aa inner join ( select * from fa_total whe

10、re iperiod=6 ) bb on aa.sdeptnum=bb.sdeptnum and aa.stypenum=bb.stypenum where aa.dblyearvaluebb.dblyearvalue,分析过程,只剩下一条记录不相等:,分析过程,可以分析一下卡片数据: select * from fa_cards where sdeptnum=01105 and stypenum=010301 and dinputdate2004-05-31,分析过程,可以看到,30620.0与51870.0的差额正好是:21250.0,解决方法,分析后可以发现: 由于6月份以后系统增加了原始卡片,也会造成年初数据的变化: 其他月份也存在此问题:,解决方法,综合以上分析: 数据错误原因: 1。缺少部分数据:需要到库中增加 2。更改后还有部分数据时错误的:需要改正 3。年中录入原始卡片,造成数据不一致是正常的,结束,谢谢大家,

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 企业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号