得到错误(11,5):PL / SQL:ORA-00932:不一致的数据类型:预期NUMBER得CLOB

时间:2017-07-18 20:28:51

标签: oracle plsql

这是我程序的片段。 ** Context_value是Clob ** Order_id是int

SELECT 
    company.id,
    total_amount_sum,
    balance_move_sum
FROM company
LEFT JOIN (SELECT SUM(total_amount) total_amount_sum, company_id
           FROM sales
           GROUP BY company_id
           ) sales ON company.id = sales.company_id 
LEFT JOIN (SELECT SUM(balance_move) balance_move_sum, company_id
           FROM moves
           GROUP BY company_id
           ) moves ON company.id = moves.company_id

错误是 错误(11,5):PL / SQL:忽略SQL语句 错误(11,5):PL / SQL:ORA-00932:不一致的数据类型:预期NUMBER获得CLOB

1 个答案:

答案 0 :(得分:2)

您必须使用XMLTYPE()将context_value转换为数据类型XMLtype,如图所示。

UNNotificationExtensionDefaultContentHidden