首页 > 数据库技术 > 详细

各公司年资金归集汇总sql

时间:2015-08-07 19:02:33      阅读:254      评论:0      收藏:0      [点我收藏+]
select bd_accid.accidcode,
       bd_accid.accidname,
      -- fts_voucher_b.interestdate,
      -- fts_voucher_b.summary,
       --fts_voucher_b.debitamount,
      -- fts_voucher_b.creditamount,
       sum(fts_voucher_b.creditamount)年归集   
  from fts_voucher_b, bd_accid
 where fts_voucher_b.dr = 0
   and fts_voucher_b.pk_corp = 1162
   and fts_voucher_b.pk_account = bd_accid.pk_accid
  -- and bd_accid.accidcode = ‘011501‘ --公司
   and fts_voucher_b.creditamount <> 0
   and substr(fts_voucher_b.interestdate, 1, 4) = 2014 --年份
   and fts_voucher_b.pk_ass not in
       (select freevalueid from gl_freevalue where valuecode = 777777) 
       group by bd_accid.accidcode,
       bd_accid.accidname
 order by bd_accid.accidcode 

技术分享

各公司年资金归集汇总sql

原文:http://www.cnblogs.com/sumsen/p/4711552.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!