Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL statement problem

Re: SQL statement problem

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/08/09
Message-ID: <965847548.24803.1.pluto.d4ee154e@news.demon.nl>#1/1

sure there is, assuming you use sql*plus

column fil new_value filnam
select 'import'||TO_CHAR(SYSDATE,'MM-DD-YYYY-HH24:MI:SS')||'.log' fil from dual
/
spool &filnam

etc...

Hth,

Sybrand Bakker, Oracle DBA

"Michael Brennan" <Michael.Brennan_at_villanova.edu> wrote in message news:39919D26.6407881D_at_villanova.edu...
> I'm trying to set up a SQL script which spools it's command output into
> log with a different name every time it is run based on the current
> date. Here is what I have right now:
>
> spool import'SELECT TO_CHAR(SYSDATE,'MM-DD-YYYY-HH24:MI:SS') DT FROM
> DUAL'.log
>
> Is there an easy way to create these log files with this particular
> format via selecting the current date and time from dual? I thank you in
> advance for any input.
>
Received on Wed Aug 09 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US