Exception: Expected Identifier or quoted identifier

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.

      

accounts-balances-totals.

      

    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

      

         from

      

         (

      

           select credit_account, transaction_id, transaction_date, amount as credit, 0 as debit

      

           from bank_transaction

      

           union

      

           select debit_account, transaction_id,transaction_date, 0 as credit, amount as debit

      

           from bank_transaction

      

         ) where credit_account in (select account_id from customers_accounts where customer_id = :customer-id)

      

         group by credit_account

      

    end-exec.

      

   

      

    exec sql

      

        open accounts_totals_balances

      

    end-exec.

      

   

      

    exec ado

      

        get cursor accounts_totals_balances into :balance-sheet-set

      

            rename datatable as accounts_totals

      

    end-exec.

      

   

      

    set result-set to balance-sheet-set::Copy.

      

   

      

    exec sql

      

        close accounts_totals_balances

      

    end-exec.

Thanks