Cita:
Iniciado por matanga Este ejemplo sirve para crear el nombre del fichero spool en función de la fecha.
Código:
set termout off
set markup html on spool on
alter session set nls_date_format='mm-dd-yyyy';
column spool_file new_val spool_file
select to_char(sysdate,'dd-mm-yyyy')||'.xls' spool_file from dual;
spool &spool_file
aqui va la query normal select * from xxxxxxxxx xxx xxx x x xx x x x x
spool off
set markup html off spool off
exit;
Saludos
Amigo muchas gracias funciona perfecto era lo que buscaba, pero sabes quiero aprovechar pero no se porque el script si hay mas de 14 registros por ejemplo 109 me vuelve a colocar las cabezeras con 14 registros mas y asi sucesivamente. mira el ejemplo... y necesito que sea de corrido es decir q solo muestre las cabeceras al principio esper me puedan ayudar,,, el script es el mismo.
MVMN_NMR_DOCUMENTO_R MVMN_FCH_E MVMN_NMR_PAPELETA_RE
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
MVMN_NMR_DOCUMENTO_R MVMN_FCH_E MVMN_NMR_PAPELETA_RE
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda
dadadadas dadasdada dadasdadasd
dadasdadsa dadasdasd dadadadasda