select sum((
SELECT
SUM (gb.period_net_dr - gb.period_net_cr) "PTD"
FROM gl_balances gb, gl_code_combinations gcc
WHERE
gb.period_name = NVL(:P_PERIOD,gb.period_name)
AND gb.currency_code = (SELECT currency_code FROM gl_ledgers WHERE ledger_id = gb.ledger_id)
AND gcc.segment4 =(select FLEX_VALUE from FND_FLEX_VALUES_VL where description ='Pass Through Costs To Be Realised')
AND gb.code_combination_id = gcc.code_combination_id)
+
(SELECT
SUM (gb.period_net_dr - gb.period_net_cr) "PTD"
FROM gl_balances gb, gl_code_combinations gcc
WHERE
gb.period_name = NVL(:P_PERIOD,gb.period_name)
AND gb.currency_code = (SELECT currency_code FROM gl_ledgers WHERE ledger_id = gb.ledger_id)
AND gcc.segment4 =(select FLEX_VALUE from FND_FLEX_VALUES_VL where description ='Pass Through Costs Realised')
AND gb.code_combination_id = gcc.code_combination_id)) as Total_Pass_Through_Costs
from
dual)
(select sum((
SELECT
SUM (gb.period_net_dr - gb.period_net_cr) "PTD"
FROM gl_balances gb, gl_code_combinations gcc
WHERE
gb.period_name = NVL(:P_PERIOD,gb.period_name)
AND gb.currency_code = (SELECT currency_code FROM gl_ledgers WHERE ledger_id = gb.ledger_id)
AND gcc.segment4 =(select FLEX_VALUE from FND_FLEX_VALUES_VL where description ='Services Billing')
AND gb.code_combination_id = gcc.code_combination_id)
+
(SELECT
SUM (gb.period_net_dr - gb.period_net_cr) "PTD"
FROM gl_balances gb, gl_code_combinations gcc
WHERE
gb.period_name = NVL(:P_PERIOD,gb.period_name)
AND gb.currency_code = (SELECT currency_code FROM gl_ledgers WHERE ledger_id = gb.ledger_id)
AND gcc.segment4 =(select FLEX_VALUE from FND_FLEX_VALUES_VL where description ='pass Through Billing')
AND gb.code_combination_id = gcc.code_combination_id)) as Total_Billing
from
dual
如何删除此错误 (java.sql.SQLSyntaxErrorException:ORA-00933:SQL命令未正确结束)
答案 0 :(得分:0)
有2个没有配对的座位:
你可以从字符串中检查一下那些:
...
from
dual)
(select sum...
它们似乎没有在任何地方打开/关闭。
答案 1 :(得分:0)
修复查询中的实际错误,不会让其他人搜索答案对此有用。
但是,找到此类问题的一些(明显的)提示可能会有用。
所以。 。 。
修复此类错误是编码人员几乎可以为任何语言学习的基本技能。