1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| set echo off ver off feed off pages 0
--set linesize 200
set termout off
set feedback off
set trimout off
set heading off
set sqlprompt ' '
set verify off
set space 0
SET NEWPAGE none
SET PAGESIZE 0
set trimspool on
spool &2
select 'set echo off ver off feed off pages 0 pagesize 0 termout off feedback off
spool &3 ' from dual union all
select 'select ' from dual union all
select * from (select decode(column_id,maxid,column_name,column_name||'|| ''|'' ||') from user_tab_columns a,(select max(column_id) maxid,table_name from user_tab_columns where tabl
e_name='PRRT' group by table_name) b where a.table_name =b.table_name order by column_id) union all
select ' from PRRT where prrt_dateacnt=&1 and prrt_stus=7
and prrt_methpaym IN (4, 20, 21, 22) ' from dual union all select 'union ' from dual union all
select 'select ' from dual union all
select * from (select decode(column_id,maxid,column_name,column_name||'|| ''|'' ||') from user_tab_columns a,(select max(column_id) maxid,table_name from user_tab_columns where tabl
e_name='PRRT' group by table_name) b where a.table_name =b.table_name order by column_id) union all
select ' from PRRT, APIS_PRRT_RPT where prrt_dateacnt=&1 and prrt_stus=7
and prrt_methpaym NOT IN (4, 20, 21, 22) and prrt_oprf=reference ;' from dual;
select ' spool off
exit; ' from dual;
spool off
exit; |
Partager