Oracle: convert LONG to VARCHAR2

set serveroutput on

s_sql varchar2(2000);
s_rez varchar2(32767);
s_sql := 'select LONG_COLUMN from SOME_TABLE where ID_COLUMN = 123' ;
execute immediate s_sql into s_rez;

-- print it on the screen or convert/transform/search...
dbms_output.put_line ( s_rez ) ;


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.