找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

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

[技巧] U8实施顾问常用sql语句-删除出入库单

[复制链接]
发表于 2022-5-23 13:10:24 | 显示全部楼层 |阅读模式

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

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

×
查询单据类型=01(采购入库单),2021-05-01后,未记账(记账人为空)的,采购入库单子表
select  cbaccounter,* from rdrecords where id in  
(select id from  rdrecord  where cvouchtype='01' and ddate>='2021-05-01'  and  cbaccounter is NULL)

删除单据类型=01(采购入库单),2021-05-01后,未记账(记账人为空)的,采购入库单子表
delete  from rdrecords where id in  
(select id from  rdrecord  where cvouchtype='01' and ddate>='2021-05-01'  and  cbaccounter is NULL)

查询无子表记录的,采购入库单主表
Select * from Rdrecord Where ID not in (select id from Rdrecords)

删除无子表记录的,采购入库单主表
Delete Rdrecord Where ID not in (select id from Rdrecords)

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

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

GMT+8, 2024-3-29 03:15 , Processed in 0.045569 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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