RE: LONG to char

2001-02-22 Thread Gunawan Yuwono
Try use PL/SQL Block with DBMS_OUTPUT: SET SERVEROUTPUT ON SIZE 10 DECLARE CURSOR c_cursor IS SELECT long_type_column, varchar2_type_column FROM tab1; BEGIN FOR c_row IN c_cursor LOOP DBMS_OUTPUT.PUT_LINE('INSERT INTO TAB2 VALUES (''' || c_row.long_type_column ||

RE: LONG to char

2001-02-20 Thread Johan [EMAIL PROTECTED] Services
Hi I'm attemting to write an insert script for a table: Spool out.log SELECT 'INSERT INTO TAB2 VALUES(''' || LONG_TYPE_COLUMN || ''',''' || VARCHAR2_TYPE_COLUMN||''');' FROM TAB1; spool off (It moans about Inconsistant Datatypes - which I can understand) Any ideas on how to get around this

RE: LONG to char

2001-02-20 Thread Adam Turner
I am doing this now. In a very lame and inneffecient way. I wrote a cursor and am taking my LOB into a really long VARCHAR2(1) or whatever variable then substringing it out into several smaller VARCHAR2(4000) fields. It isn't pretty, but it is working without errors adam -Origi