SQL语句 - 导出系统内的资产类别及其设置项


SQL语句作用

导出资产类别及其相关设置进行校验。    

包含:会计科目、年限、折旧惯例等


select fcv.segment1 || '.' || fcv.segment2 || '.' || segment3,
       fcv.description,
       fcb.book_type_code,
       fcv.capitalize_flag,
       fcv.enabled_flag,
       fcv.inventorial in_physical_inventory,
       (select concatenated_segments
          from gl_code_combinations_kfv
         where code_combination_id = fcb.asset_clearing_account_ccid) asset_clearing,
       (select concatenated_segments
          from gl_code_combinations_kfv
         where code_combination_id = fcb.asset_cost_account_ccid) asset_cost,
       (select concatenated_segments
          from gl_code_combinations_kfv
         where code_combination_id = fcb.deprn_expense_account_ccid) depreciation_expense,
       (select concatenated_segments
          from gl_code_combinations_kfv
         where code_combination_id = fcb.reserve_account_ccid) accumulated_depreciation,
       (select concatenated_segments
          from gl_code_combinations_kfv
         where code_combination_id = fcb.bonus_expense_account_ccid) bonus_expense,
       (select concatenated_segments
          from gl_code_combinations_kfv
         where code_combination_id = fcb.bonus_reserve_acct_ccid) bonus_reserve,
       (select concatenated_segments
          from gl_code_combinations_kfv
         where code_combination_id = fcb.wip_cost_account_ccid) cip_cost,
       (select concatenated_segments
          from gl_code_combinations_kfv
         where code_combination_id = fcb.wip_clearing_account_ccid) cip_clearing,
       fcbd.start_dpis placed_in_service,
       fcbd.deprn_method Method,
       ceil(fcbd.life_in_months / 12) life_years,
       fcbd.life_in_months - ceil(fcbd.life_in_months / 12) * 12 months,
       fcbd.PERCENT_SALVAGE_VALUE,
       fcbd.prorate_convention_code proate_convention,
       fcbd.retirement_prorate_convention retirement_prorate
  from FA_CATEGORIES_VL          fcv,
       FA_CATEGORY_BOOKS         fcb,
       FA_CATEGORY_BOOK_DEFAULTS fcbd
 where fcb.category_id = fcv.category_id
   and fcb.category_id = fcbd.category_id
   and fcb.book_type_code = fcbd.book_type_code


本文标题:SQL语句 - 导出系统内的资产类别及其设置项

本文链接:https://catonisland.cn/post/95.html

本文版权归作者所有,欢迎转载,转载请以文字链接的形式注明文章出处。

相关文章