Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: sqlplus question
SPOOL YOURFILENAME&1;
SELECT ...
FROM ..
WHERE TO_CHAR(YOUR_DATE,'MON') LIKE '&1';
SPOOL OFF;
/
@FILENAME JAN
GreyWolf_69 wrote in message <3832FCAD.110D8512_at_alloymail.com>...
>Hi
> I have a sql script that is ran from win98 and out puts a report. I
>want to use a vairablie to set the the month. I then want to use this
>vairable in the spool command to include the month in the file name.
>
>What is the syntax? I've tried a hunder different ways but it doesn't
>work right. I can get the value of the varibale in the file name but I
>end up with the ' marks in the file name. Any help would be great.
>
>Thanks,
>
>Wolf
>
Received on Wed Nov 17 1999 - 13:22:54 CST