zoukankan      html  css  js  c++  java
  • 科目余额SQL

    select gb.period_year 会计年度,
           gb.period_name 会计期间,
           gcck.concatenated_segments 科目代码,
           gl_flexfields_pkg.get_description_sql(gcck.chart_of_accounts_id,
                                                 
    1,
                                                 gcck.segment1) 公司,
           gl_flexfields_pkg.get_description_sql(gcck.chart_of_accounts_id,
                                                 
    2,
                                                 gcck.segment2) 成本中心,
           gl_flexfields_pkg.get_description_sql(gcck.chart_of_accounts_id,
                                                 
    3,
                                                 gcck.segment3) 会计科目,
           gl_flexfields_pkg.get_description_sql(gcck.chart_of_accounts_id,
                                                 
    4,
                                                 gcck.segment4) 子科目,
           gl_flexfields_pkg.get_description_sql(gcck.chart_of_accounts_id,
                                                 
    5,
                                                 gcck.segment5) 产品段,
           gl_flexfields_pkg.get_description_sql(gcck.chart_of_accounts_id,
                                                 
    6,
                                                 gcck.segment6) 片区,
           gl_flexfields_pkg.get_description_sql(gcck.chart_of_accounts_id,
                                                 
    7,
                                                 gcck.segment7) 备用
           
          ,
           gb.begin_balance_dr 
    - gb.begin_balance_cr 期初余额,
           gb.period_net_dr 本期借方发生,
           gb.period_net_cr 本期贷方发生,
           nvl(gb.period_net_dr, 
    0- nvl(gb.period_net_cr, 0) 本期净额,
           nvl(gb.begin_balance_dr, 
    0+ nvl(gb.period_net_dr, 0-
           nvl(gb.begin_balance_cr, 
    0- nvl(gb.period_net_cr, 0) 期末余额
      
    from gl.gl_balances           gb,
           gl_code_combinations_kfv gcck
     
    where gb.code_combination_id = gcck.code_combination_id
       
    and gb.currency_code = 'CNY'
       
    and gcck.summary_flag = 'N'
       
    and gb.actual_flag = 'A'

       AND gb.period_name = '2010-11'
       AND gcck.concatenated_segments like '02.021200.6501.%.0000.0000.000' 


             

                成长

           /      |     \

        学习   总结   分享

    QQ交流群:122230156

  • 相关阅读:
    HibernateTools实现pojo类 数据库schma mapping映射的相互转换
    hibernate基础(1)
    使用Myeclipse完成Hibernate的逆向工程
    hibernate.cfg.xml文件的说明
    hibernate自动生成映射文件
    为什么出现ORM
    hibernate 的映射文件快速生成:使用CodeSmith快速生成映射文件和映射类
    geotools修改shapefile 属性名乱码问题
    HDU 4584
    HDU 4576 Robot
  • 原文地址:https://www.cnblogs.com/benio/p/1922845.html
Copyright © 2011-2022 走看看