Oracle Long Raw Problem

浪尽此生 提交于 2020-01-06 07:19:23

问题


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 datatypes: expected CHAR got LONG BINARY

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


回答1:


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.



来源:https://stackoverflow.com/questions/2644051/oracle-long-raw-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!