Can't export my database using exp with XMLTYPE member column
LEARNING TO LOVE LOBS
And please let me know what kind of problem you are facing by leaving comment so that I can blog about that too.
Today when I was trying to execute following query it errors out "ORA-00932: inconsistent datatypes: expected - got CLOB". Though it works fine for "distinct cust.*", "distinct hp.*", "distinct hps.*" and "distinct hpsu.*","distinct cust.*" but when I try to SELECT distinct rows from raa ("distinct raa.*") it errors out.
I have googled this problem but no cure because everyone suggested to check database and change the data types. Though in other cases it could be only achieved by making changes in database but in my case I just remove "DISTINCT" from query and it works fine. :)
WHERE cust.party_id = hp.party_id
ORA-00932: inconsistent datatypes: expected - got CLOB
In addition when I try to drill the error what I found that we cannot ORDER BY or Distinct a CLOB. I first Describe the table and checked which field is having CLOB data type.
Now I know that "ADDRESS_TEXT" is the field. I try to run the following queries
each query returned the same error.
Now I try the following query and it works fine.
You can too use this function to avoid the error dbms_lob.substr()
Your feedback/comment is quite important for improving this blog so feel free to leave your comments & suggestions