首页 > 数据库技术 > 详细

科技活动经费sql2014

时间:2014-04-17 19:08:26      阅读:470      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
select bd_glorgbook.glorgbookcode,bd_glorgbook.glorgbookname,
       gl_detail.explanation,
       bd_accsubj.dispname,
       gl_detail.debitamount 借方,
       gl_detail.creditamount 贷方,
       gl_detail.prepareddatev 制单日期,
       gl_voucher.no 凭证号,
       wmsys.wm_concat(gl_freevalue.valuecode) valuecode,
       wmsys.wm_concat(gl_freevalue.valuename) valuename,
       gl_detail.pk_systemv,
       gl_detail.detailindex
  from bd_accsubj
  join gl_detail
    on gl_detail.pk_accsubj = bd_accsubj.pk_accsubj
  join bd_glorgbook
    on bd_glorgbook.pk_glorgbook = bd_accsubj.pk_glorgbook
  join gl_voucher
    on gl_detail.pk_voucher = gl_voucher.pk_voucher
  left join gl_freevalue
    on gl_detail.assid = gl_freevalue.freevalueid
 where gl_detail.dr = 0
 and ( bd_accsubj.subjcode like  4104010508%or bd_accsubj.subjcode like  550212%)
    
   and bd_glorgbook.glorgbookcode like 01%-0001
   and gl_detail.yearv = 2013
 /* and gl_detail.creditamount =‘0‘*/
   and gl_detail.explanation<>期初
   and gl_detail.debitamount<>0
  /* and gl_detail.explanation=‘付财大凤凰楼项目人工费(洪荣森)‘*/
--and bd_accsubj.subjcode like ‘150103%‘
 group by bd_glorgbook.glorgbookcode,bd_glorgbook.glorgbookname, gl_detail.explanation,
          bd_accsubj.dispname,
          gl_detail.creditamount,
          gl_detail.debitamount,
          gl_detail.prepareddatev,
          gl_voucher.no,
          gl_detail.pk_systemv,
          gl_detail.detailindex
 order by  bd_glorgbook.glorgbookcode, bd_accsubj.dispname,gl_detail.prepareddatev, gl_voucher.no
bubuko.com,布布扣

 

科技活动经费sql2014,布布扣,bubuko.com

科技活动经费sql2014

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

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