Hi, Can anybody help me out in getting this query to work? I've tested it on the sql command line and it works perfectly but when I try to run the project it produces that error in the post title, I am using Oracle database.
set customer-id to type Int64::Parse(report-term::ToString()).
exec sql declare accounts_totals_balances dataset cursor for
select credit_account as account_id, sum(credit) as credit_balance, sum(debit) as debit_balance, sum(credit) - sum(debit) as balance
select credit_account, transaction_id, transaction_date, amount as credit, 0 as debit
select debit_account, transaction_id,transaction_date, 0 as credit, amount as debit
) where credit_account in (select account_id from customers_accounts where customer_id = :customer-id)
group by credit_account
get cursor accounts_totals_balances into :balance-sheet-set
rename datatable as accounts_totals
set result-set to balance-sheet-set::Copy.