I am trying to run the below query in SQL developer which gives weird result in the output:
select utl_raw.cast_to_varchar2(dbms_lob.substr(message,100))
from XML_MESSAGE;
My problem is that the result shows the correct XML message for some rows but random value for others like this: x�[o�~߯���m0��$N�k��m��~�S�_���|d�G��qmD�7拔����
I am not sure why this happening. Is it because of casting BLOB to varchar2?