ORA-00932: inconsistent datatypes: expected - got CLOB
i am writing the following function :
FUNCTION get_deal_rights(p_deal_id NUMBER,p_type_code NUMBER) RETURN CLOB is
CURSOR deal_properies_cur(p_deal_id NUMBER) IS
SELECT description
FROM properties
WHERE deal_id = p_deal_id
deal_rights CLOB := null;
BEGIN
DBMS_LOB.CREATETEMPORARY(deal_rights,true);
FOR deal_properies_rec IN deal_properies_cur(p_deal_id LOOP
deal_rights := deal_rights ||to_clob(deal_rights_rec.rights) ||', ' ;
END LOOP;
RETURN deal_rights;
END get_deal_rights;
When i call this funtion from an sql statement to get the property descriptions of a deal i get the following error : ORA-00932: inconsistent datatypes: expected - got CLOB.
Please advice ..