CLOSING BALANCE
SELECT
cc.concatenated_segments "GL Account"
,cc.gl_account_type "Account Type"
,nvl(sum(bal.begin_balance_dr - bal.begin_balance_cr +
bal.period_net_dr - bal.period_net_cr),0) "Closing Balance"
,bal.period_name "Period Name"
FROM gl_code_combinations_kfv cc
,gl_balances bal
WHERE cc.code_combination_id = bal.code_combination_id
AND bal.period_name = [Period Name]
AND bal.set_of_books_id = [Set of Book ID]
GROUP BY
cc.concatenated_segments
,cc.gl_account_type
,bal.period_name
ORDER BY
cc.concatenated_segments
SELECT
cc.concatenated_segments "GL Account"
,cc.gl_account_type "Account Type"
,nvl(sum(bal.begin_balance_dr - bal.begin_balance_cr +
bal.period_net_dr - bal.period_net_cr),0) "Closing Balance"
,bal.period_name "Period Name"
FROM gl_code_combinations_kfv cc
,gl_balances bal
WHERE cc.code_combination_id = bal.code_combination_id
AND bal.period_name = [Period Name]
AND bal.set_of_books_id = [Set of Book ID]
GROUP BY
cc.concatenated_segments
,cc.gl_account_type
,bal.period_name
ORDER BY
cc.concatenated_segments
No comments:
Post a Comment