Oracle Long Term Problem

select utl_raw.cast_to_varchar2 (DCFILE) hexchar from T_FILE

ORA-00997: illegal use of the LONG data type

select to_char(DOC_FILE) hexchar from T_DOC_FILE 

ORA-00932: inconsistent data types: expected CHAR received LONG BINARY

My long raw column type, how to make selected varchar2?

0
source share
1 answer

Oracle introduced its LOB data types in version 8.0, over a decade ago. LONG AND LONG RAW MATERIALS are out of date before the Millennium (in favor of CLOB and BLOB, respectively) precisely because working with LONG is a pain in the neck, and LONG RAW is double as you find now.

What exactly are you trying to achieve? Your logic seems confused. LONG RAW is designed to store binary data (images, documents, etc.), therefore, providing it in the form of text is unlikely to give satisfactory results.

+2
source

Source: https://habr.com/ru/post/1307024/


All Articles