set termout off
set newpage none
set pagesize 9999
set linesize 1024
set trimspool on
set trimout on
set echo off
set verify off
set heading off
set feedback off
spool tmp.sql
select 'set heading on' from dual;
select 'set termout off' from dual;
select 'set MARKUP HTML ON' from dual;
select 'set newpage none' from dual;
select 'set pagesize 9999' from dual;
select 'set linesize 1024' from dual;
select 'spool c:\table1.xls' from dual;
select 'column tablename format a30 heading "Tablename"' from dual;
select 'select ' || chr(39) || TABLE_NAME || chr(39) || ' as tablename from dual;' || chr(10) || chr(10) ||
'select * from ' || TABLE_NAME || ';' as sqlstmt from dba_tables where owner ='ABC' and table_name not like 'BIN$%' order by TABLE_NAME;
select 'spool off' from dual;
spool off
@tmp.sql
set termout on
exit
No comments:
Post a Comment