SUMSEN

Oracle&Sql爱好者,用友NC管理员

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

select bd_glorgbook.glorgbookcode,gl_voucher.year,gl_voucher.period,gl_voucher.no
 from gl_voucher,bd_glorgbook
where  gl_voucher.pk_glorgbook=bd_glorgbook.pk_glorgbook
AND gl_voucher.pk_voucher in
 ( select pk_voucher from gl_detail,bd_accsubj
 where gl_detail.pk_accsubj=bd_accsubj.pk_accsubj
 and bd_accsubj.endflag='N'
)
order by 1

 

select*  from gl_detail where  pk_accsubj in (select  pk_accsubj from bd_accsubj where bd_accsubj .Endflag='N')

posted on 2016-06-23 16:10  sumsen  阅读(263)  评论(0编辑  收藏  举报