web analytics

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 = 123’ ; EXECUTE IMMEDIATE s_sql INTO s_rez; — print it on the screen or convert/transform/search… dbms_output.put_line ( s_rez ) ; END;