找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 4980|回复: 1

[政务] R9批量删除无余额无发生额的往来科目

[复制链接]
发表于 2008-7-3 16:10:11 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
R9批量删除无余额无发生额的往来科目
方法:如想删除110科目下无无余额无发生额的往来科目,在查询分析器中选择要操作的账套,运行如下代码即可
select * from gl_kmxx where (gsdm='' or gsdm='2008') and kmdm in (select kmdm from gl_kmye where kmdm like '110%' and kmncj+kmncd+kmjf1+kmjf2+kmjf3+kmjf4+kmjf5+kmjf6+kmjf7+kmjf8+kmjf9+kmjf10+kmjf11+kmjf12+kmdf1+kmdf2+kmdf3+kmdf4+kmdf5+kmdf6+kmdf7+kmdf8+kmdf9+kmdf10+kmdf11+kmdf12=0 and kjnd=2008 and len(kmdm)>3)
select * from gl_kmye where kmdm like '110%' and kmncj+kmncd+kmjf1+kmjf2+kmjf3+kmjf4+kmjf5+kmjf6+kmjf7+kmjf8+kmjf9+kmjf10+kmjf11+kmjf12+kmdf1+kmdf2+kmdf3+kmdf4+kmdf5+kmdf6+kmdf7+kmdf8+kmdf9+kmdf10+kmdf11+kmdf12=0 and kjnd=2008 and len(kmdm)>3
select * from gl_kmyek where kmdm like '110%' and kmncj+kmncd+kmjf1+kmjf2+kmjf3+kmjf4+kmjf5+kmjf6+kmjf7+kmjf8+kmjf9+kmjf10+kmjf11+kmjf12+kmdf1+kmdf2+kmdf3+kmdf4+kmdf5+kmdf6+kmdf7+kmdf8+kmdf9+kmdf10+kmdf11+kmdf12=0 and kjnd=2008 and len(kmdm)>3


delete  from gl_kmxx where (gsdm='' or gsdm='2008') and kmdm in (select kmdm from gl_kmye where kmdm like '110%' and kmncj+kmncd+kmjf1+kmjf2+kmjf3+kmjf4+kmjf5+kmjf6+kmjf7+kmjf8+kmjf9+kmjf10+kmjf11+kmjf12+kmdf1+kmdf2+kmdf3+kmdf4+kmdf5+kmdf6+kmdf7+kmdf8+kmdf9+kmdf10+kmdf11+kmdf12=0 and kjnd=2008 and len(kmdm)>3)
delete  from gl_kmye where kmdm like '110%' and kmncj+kmncd+kmjf1+kmjf2+kmjf3+kmjf4+kmjf5+kmjf6+kmjf7+kmjf8+kmjf9+kmjf10+kmjf11+kmjf12+kmdf1+kmdf2+kmdf3+kmdf4+kmdf5+kmdf6+kmdf7+kmdf8+kmdf9+kmdf10+kmdf11+kmdf12=0 and kjnd=2008 and len(kmdm)>3
delete  from gl_kmyek where kmdm like '110%' and kmncj+kmncd+kmjf1+kmjf2+kmjf3+kmjf4+kmjf5+kmjf6+kmjf7+kmjf8+kmjf9+kmjf10+kmjf11+kmjf12+kmdf1+kmdf2+kmdf3+kmdf4+kmdf5+kmdf6+kmdf7+kmdf8+kmdf9+kmdf10+kmdf11+kmdf12=0 and kjnd=2008 and len(kmdm)>3

[ 本帖最后由 rcldc 于 2008-7-4 10:07 编辑 ]
发表于 2008-7-10 09:13:49 | 显示全部楼层
还有个方法 就是修改一下gl—kmxx, 把无余额无发生额的往来科目本年度 (一定是本年度即 gsdm=‘’ 其他年度不要改 )里的syzt  改为 0 就可以去前台删除往来科目了。(修改数据库有风险 修改前要做备份)
您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-12-4 16:34 , Processed in 0.067523 second(s), 10 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表