SELECT ct.trx_number ,adj.adjustment_number ,ad.amount_dr ,ad.amount_cr ,ad.source_table ,ad.source_type ,xla_oa_functions_pkg.get_ccid_description(gcc.chart_of_accounts_id ,ad.code_combination_id) FROM ar_distributions_all ad ,ar_adjustments_all adj ,ra_customer_trx_all ct ,gl_code_combinations gcc WHERE ad.source_table = ' ADJ ' AND ad.source_id = adj.adjustment_id AND adj.customer_trx_id = ct.customer_trx_id AND gcc.code_combination_id = ad.code_combination_id; 来源: oschina 链接: https://my.oschina.net/u/4374628/blog/3740330