« Oracle: recreate database links | Home | WHERE command for DOS »

Oracle: convert LONG to VARCHAR2

SET serveroutput ON

declare
s_sql varchar2(2000);
s_rez varchar2(32767);
begin
s_sql := 'select LONG_COLUMN from SOME_TABLE where ID_COLUMN = 12345' ;
execute immediate s_sql INTO s_rez;

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

end;

Topics: Oracle, conversion, type conversion | Submitter: checkthis

Comments

You must be logged in to post a comment.

Keep on coding