Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00932: inconsistent datatypes: expected - got CLOB

Patrick SNov 26 2007 — edited Nov 27 2007
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 ..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 25 2007
Added on Nov 26 2007
5 comments
8,127 views