Re: Spool Command

From: <Lance.Humpert_at_mail.tju.edu>
Date: 1996/08/19
Message-ID: <177E8D08C.ASVLH_at_TJUVM.TJU.EDU>#1/1


Robert J. McCallister writes:  

> Is their a way to concatenate the sysdate with a file name using the
> spool command?
>
> What I am hoping to do have is something like:
>
> filename.081696
 

Could you pass the filename to SQL*Plus as a command line argument? If you can execute syntax like:  

  $FILENAME=filename.`date +%m%d%y`
  sqlplus userid/password _at_my_program.sql $FILENAME  

...and in your sql program code:  

  spool &1;  

This spools the output from 'my_program.sql' to the file name specified by $FILENAME. This assumes a unix-like platform and that you're invoking your program from a command line rather than from inside SQL*Plus.  

  • Lance (sorry to be presumptuous...)
Received on Mon Aug 19 1996 - 00:00:00 CEST

Original text of this message