node.js - ORA-00933: SQL command not properly ended - Oracle SQL error -
i trying run select query against oracle db using oracledb node.js module.
here query:
select gcc.concatenated_segments code_combination, sum (nvl(gb.begin_balance_dr, 0) - nvl(gb.begin_balance_cr, 0)) beginning_bal, sum (nvl(gb.begin_balance_dr, 0) - nvl(gb.begin_balance_cr, 0) (nvl(gb.period_net_dr, 0) - nvl(gb.period_net_cr, 0))) end_bal gl_balances gb, gl_code_combinations_kfv gcc gb.code_combination_id = gcc.code_combination_id , gcc.concatenated_segments = '01-000-2990-0000-000' , gb.ledger_id = 1 , gb.actual_flag = 'a' , gb.period_name = 'nov-16' , gb.currency_code = ( select currency_code gl_ledgers ledger_id = gb.ledger_id ) group gcc.concatenated_segments;
could point out i'm going wrong query, can't see wrong it! can post whole code sample if seems issue sql.
you missing algebra:
select gcc.concatenated_segments code_combination, <--- need comma separating these 2 sum (nvl(gb.begin_balance_dr, 0) - nvl(gb.begin_balance_cr, 0)) beginning_bal, sum (nvl(gb.begin_balance_dr, 0) - nvl(gb.begin_balance_cr, 0) (nvl(gb.period_net_dr, <---- , need subtraction sign before nvl here 0) - nvl(gb.period_net_cr, 0))) end_bal ...
Comments
Post a Comment