How to Join Between Project Accounting Sub ledger and GL Sub Ledger Journal Lines
Summary:
We would like to know the most optimal way to join Project Accounting Sub ledger and GL Journal Lines. We understand we can join either by events or by distributions and would like to know what the pros and cons of joining either way. Any pointers will be greatly appreciated!
Content (please ensure you mask any confidential information):
Here is an example of what we have tried so far:
Distribution based joins give 3 rows per journal
select sl_jl.TransactionSourceIdInt1, count(1) from `strategic_finance_data_full.sl_journal` sl_jl left join `strategic_finance_staging_full.subledger_journal_distribution_extract_pvo` sl_jl_dist on sl_jl.SLHeaderID = sl_jl_dist.JournalEntryDistributionAeHeaderId and sl_jl.SLLineNum = sl_jl_dist.JournalEntryDistributionAeLineNum leftjoin`strategic_finance_staging_full.project_cost_distribution_extract_pvo`prj_cost on prj_cost.PjcCostDistLinesAllExpenditureItemId = sl_jl_dist.JournalEntryDistributionSourceDistributionIdNum1 left join `strategic_finance_staging_full.expenditure_item_pvo` exp_item on exp_item.ExpenditureItemId = prj_cost.PjcCostDistLinesAllExpenditureItemId where sl_jl.ApplicationId = 10036 and sl_jl.LedgerSetName is not null and sl_jl.TransactionSourceIdInt1 in (18000) group by sl_jl.TransactionSourceIdInt1 order by sl_jl.TransactionSourceIdInt1