$ cat me.sql
set echo off
set term off
set line 1000 pages 0
set feedback off
set heading off
set trimspool on
spool /aiapp/tungsten/shell/o2m/test.sql
select 'INSERT INTO res_d_mphone (SERIAL_NUMBER,MOFFICE_ID,CODE_STATE_CODE,BUSI_TYPE_CODE,USE_TYPE_CODE,CODE_TYPE_CODE,STOCK_ID,POOL_CODE,CITY_CODE,EPARCHY_CODE,PROVINCE_CODE,NUMBER_SOURCE,IS_ASSIGN,IS_PRETTYNUM,IS_PREPARE_MATCH,IS_PREPARE_OPEN,IS_LOCK,RESERVE_TIME,TIME_IN,STAFF_ID,BATCH_ID,REMARK) VALUES ('''||SERIAL_NUMBER||''','''||MOFFICE_ID||''','''||CODE_STATE_CODE||''','''||BUSI_TYPE_CODE||''','''||USE_TYPE_CODE||''','''||CODE_TYPE_CODE||''','''||STOCK_ID||''','''||POOL_CODE||''','''||CITY_CODE||''','''||EPARCHY_CODE||''','''||PROVINCE_CODE||''','''||NUMBER_SOURCE||''','''||IS_ASSIGN||''','''||IS_PRETTYNUM||''','''||IS_PREPARE_MATCH||''','''||IS_PREPARE_OPEN||''','''||IS_LOCK||''','''||RESERVE_TIME||''','''||TIME_IN||''','''||STAFF_ID||''','''||BATCH_ID||''','''||REMARK||''');' from res_d_mphone_bak;
spool off
set trimspool off
set heading on
set feedback on
set term on
set echo on
exit

05-11 19:40