I want to select and visualize the content of a column with CLOB
datatype (>100 bytes).
select UTL_RAW.CAST_TO_VARCHAR2(DBMS_LOB.SUBSTR(ds_cirurgia,1,4000))
from AVISO_CIRURGIA
where cd_paciente = 123456789;
But I get this error:
[SELECT - 0 row(s), 0.000 secs] [Error Code: 997, SQL State: 42000] ORA-00997: illegal use of LONG datatype
I used UTL_RAW.CAST_TO_VARCHAR2(DBMS_LOB.SUBSTR())
in another column and it works.
What is wrong in this case?