Tuesday, July 3, 2012

Oracle GL Data Extraction Report

SELECT  DISTINCT GLB.period_name, GLB.ledger_id,
         glb.CURRENCY_CODE "Currency",
         GLB.period_net_cr "Period Net Credit",
         GLB.period_net_dr "Period Net Debit", gccid.segment1 "Company",
         gccid.segment2 "Cost Center", gccid.segment3 "Main Account",
         gccid.segment4 "Sub Account", gccid.segment5 "Project",
         gccid.segment6 "Region", gccid.segment7 "Future1",
         gccid.segment8 "Future2", gccid.concatenated_segments
    FROM gl_balances GLB, gl_code_combinations_kfv gccid
   WHERE gccid.code_combination_id = GLB.code_combination_id
     AND GLB.period_name BETWEEN :from_name AND :to_name
     AND GLB.ledger_id = :p_ledger_id
GROUP BY GLB.period_name,
         GLB.ledger_id,
         glb.CURRENCY_CODE,
         GLB.period_net_cr,
         GLB.period_net_dr,
         gccid.segment1,
         gccid.segment2,
         gccid.segment3,
         gccid.segment4,
         gccid.segment5,
         gccid.segment6,
         gccid.segment7,
         gccid.segment8,
         gccid.concatenated_segments
ORDER BY gccid.concatenated_segments

No comments:

Post a Comment