This content has been marked as final. Show 6 replies
I think that this no make sense.Why you want convert CLOB data type to BLOB dataype ?
FUNCTION c2b( c IN CLOB ) RETURN BLOB
-- typecasts CLOB to BLOB (binary conversion)
pos PLS_INTEGER := 1;
buffer RAW( 32767 );
lob_len PLS_INTEGER := DBMS_LOB.getLength( c );
DBMS_LOB.createTemporary( res, TRUE );
DBMS_LOB.OPEN( res, DBMS_LOB.LOB_ReadWrite );
buffer := UTL_RAW.cast_to_raw( DBMS_LOB.SUBSTR( c, 16000, pos ) );
IF UTL_RAW.LENGTH( buffer ) > 0 THEN
DBMS_LOB.writeAppend( res, UTL_RAW.LENGTH( buffer ), buffer );
pos := pos + 16000;
EXIT WHEN pos > lob_len;
RETURN res; -- res is OPEN here
I have a table with a column which is BLOB and another column is CLOB. I have inserted a Microsoft Word file into the BLOB column. I would like to copy the BLOB to another column in CLOB. It is possible? If yes, how? Thanks.
But Microsoft Word document is a binary file. Are you sure about this ?
The purpose of copying the BLOB column to a CLOB column is for the full text search of words in MS Word using Oracle Text.
i think you should use CTX_DOC.FILTER