zoukankan      html  css  js  c++  java
  • sql查询工程结算分包款转出

    总一 借工程结算负数 贷工程结算对冲问题

    oralce使用聚合函数wmsys.wm_concat字段显示 clob :应该是,10.2.0.4以前,是varchar2,10.2.0.5开始,是CLOB 这是一个bug,当lob字段和order by 同时出现时可能触发 可以打上对应的补丁,或者,只要不超过4000字节,可以加个to_char来转换成字符串试试 

    select gl_detail.explanation,
          bd_accsubj.subjcode,
          bd_accsubj.dispname,       
           gl_detail.debitamount 借方,   
            gl_detail.creditamount 贷方,
            gl_detail.prepareddatev 制单日期 , 
           gl_voucher.no 凭证号, 
           to_char(wmsys.wm_concat(gl_freevalue.valuecode)) valuecode,
            to_char(wmsys.wm_concat(gl_freevalue.valuename)) valuename
             from gl_detail, bd_accsubj, bd_glorgbook,gl_freevalue,gl_voucher
     where gl_detail.pk_accsubj = bd_accsubj.pk_accsubj
       and gl_detail.pk_glorgbook = bd_glorgbook.pk_glorgbook
       and   gl_detail.assid=gl_freevalue.freevalueid
       and gl_detail.pk_voucher=gl_voucher.pk_voucher
       and gl_detail.dr = '0'
       and gl_detail.yearv='2014'
       and bd_glorgbook.glorgbookcode = '015101-0001'
       and bd_accsubj.subjcode like '2123%' 
       and  gl_detail.creditamount<0
       group by gl_detail.explanation,
       bd_accsubj.subjcode,
             bd_accsubj.dispname,       
           gl_detail.creditamount,
           gl_detail.debitamount,   
             gl_detail.prepareddatev,gl_voucher.no
      order by gl_detail.prepareddatev,gl_voucher.no

  • 相关阅读:
    property函数
    robotframework常见问题解决汇总
    python 基本的序列和映射规则
    robot framework -记录错误
    python 函数部分
    python-文件操作
    网络检测,版本更新
    应用FMDB进行数据存储
    xcode5 各区域快捷键大全
    全国第七届大学生计算机设计大赛
  • 原文地址:https://www.cnblogs.com/sumsen/p/4746907.html
Copyright © 2011-2022 走看看