0

I am using Oracle SQL Developer Tool, I have a table which has blob data type and we are storing XML in the blob object. I am not able to see the data stored in blob object either in text format or image format using oracle sql developer 4.0.3.16 version.

I tried to use the queries:

SET MARKUP HTML ON SPOOL ON; 
SPOOL report.html;
 select substr(clob_columnName , 1, 32767) from tableName...

But the output of the query is :

ORA-00932: inconsistent datatypes: expected CHAR got BLOB.

Please help me to view the blob data somehow

Fleury26
  • 585
  • 4
  • 19
  • check here: https://stackoverflow.com/questions/28449798/how-to-view-blob-data-in-oracle-sql-developer – Black.Jack Jan 24 '18 at 20:23
  • Hi Jack, the solution mentioned in the above link i have already tried and its not working for me. when i try with SET MARKUP HTML ON SPOOL ON; SPOOL report.html; select substr(clob_columnName , 1, 32767) from tableName... but the output of the query is ORA-00932: inconsistent datatypes: expected CHAR got BLOB. thank you very much for answering my question – Srikanth Kurmala Jan 24 '18 at 20:28
  • 1
    XML is *text*, isn't it? Why do you store it in **Binary** Large Object (BLOB) data type column, instead of **Character** Large Object (CLOB)? – Littlefoot Jan 24 '18 at 20:34
  • You can't use `substr()` on a `BLOB` column. –  Jan 24 '18 at 22:00
  • you are correct, ideally it should be clob, but this table came with base product. So i cannot modify data type. can you please help me how to overcome this problem. – Srikanth Kurmala Jan 25 '18 at 15:36

0 Answers0