开发者

Oracle Long Raw Problem

开发者 https://www.devze.com 2022-12-27 12:52 出处:网络
selectutl_raw.cast_to_varchar2(DCFILE) hexchar from T_FILE ORA-00997: illegal use of LONG datatype selectto_char(DOC_FILE) hexchar from T_DOC_FILE

select utl_raw.cast_to_varchar2(DCFILE) hexchar from T_FILE

ORA-00997: illegal use of LONG datatype

select  to_char(DOC_FILE) hexchar from T_DOC_FILE

ORA-00932: inconsistent d开发者_如何学Catatypes: expected CHAR got LONG BINARY

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


Oracle introduced their LOB datatypes in version 8.0, well over a decade ago. LONG and LONG RAW have been deprecated since before the Millenium (in favour of CLOB and BLOB respectively) precisely because working with LONGs is a pain in the neck and LONG RAWs doubly so, as you are now finding.

What exactly are you trying to achieve? Your logic seems confused. LONG RAW is intended for storing binary data (images, documents, etc) so rendering it as text is unlikely to produce satisfactory results.

0

精彩评论

暂无评论...
验证码 换一张
取 消