写oracle存储过程时报ora-00907:缺失右括号

2025-04-15 11:44:17
推荐回答(1个)
回答1:

试试这样
update hml_test_table set
ced=(SELECT
(select sum(nvl(SUBCONTRACTING_FEE, 0)) from statements_all_cost_item
where province = '吉林' and now_month='201310' )
+
(select nvl(SUB, 0) from statements_project_cost
where province = '吉林' and now_month=to_char(to_number('201310')-1) and status = 'Q1')
FROM dual
);