标签:凭证 U8 ca 不上 ino iyear gl id select
select * from GL_CashTable where iyear = '2020' and iPeriod = '9' and iNo_id=82 select * from gl_accvouch where iyear = '2020' and iPeriod = '9' -- 查询金额不同对应的的凭证号1 select ca.ino_id,(ca.md +ca.mc ),(gl.md+gl.mc ) from GL_CashTable ca left join gl_accvouch gl on ca.iNo_id=gl.ino_id and ca.inid=gl.inid and ca.iyear=gl.iyear and gl.iperiod=ca.iPeriod where ca.iyear='2022' and ca.iPeriod=7 and (ca.md +ca.mc )<>(gl.md+gl.mc ) -- 查询金额不同的凭证号2 select distinct ino_id into tempdb..bbb from gl_accvouch where ino_id in ( select iNo_id from GL_CashTable where iperiod=7 and iyear='2022') and iperiod=7 and iyear='2022' --and left(ccode,4) in('1001','1002','1101') select distinct ino_id into tempdb..aa from GL_CashTable where iyear = '2022' and iPeriod = '7' select ino_id from tempdb..aa where ino_id not in (select ino_id from tempdb..bbb) --备份 select * into GL_CashTable_202208030533_bak from GL_CashTable -- 查询并删除现金流量表数据 select * --delete from GL_CashTable where iperiod=7 and iyear='2022' and ino_id in (select ino_id from tempdb..aa where ino_id not in (select ino_id from tempdb..bbb) )
标签:凭证,U8,ca,不上,ino,iyear,gl,id,select 来源: https://www.cnblogs.com/xiaobaidejiucuoben/p/16548198.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。