追溯查询脚本
--按日记账头ID追溯子分类帐日记帐行(汇总) select t.ae_line_num, sum(t.accounted_dr) dr, sum(t.accounted_cr) cr from xla_ae_lines t where exists (select 1 from gl_import_references gir where gir.je_header_id = 1508731 and gir.gl_sl_link_id = t.gl_sl_link_id and gir.gl_sl_link_table = t.gl_sl_link_table) group by t.ae_line_num; --按日记账头ID追溯子分类帐日记帐行(明细) select t.ae_header_id, t.ae_line_num, t.accounted_dr dr,t.accounted_cr cr from xla_ae_lines t where exists (select 1 from gl_import_references gir where gir.je_header_id = 1508731 and gir.gl_sl_link_id = t.gl_sl_link_id and gir.gl_sl_link_table = t.gl_sl_link_table)