Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sqlplus: Help with Spooling (path and file questions)
On Oct 9, 4:46 pm, "Greg" <esab..._at_yahoo.com> wrote:
> Good morning. I'm new to sqlplus (and Oracle for that matter - but
> loving it!). I'm trying to figure out how to create path and filename
> for the spool command in sqlplus. Here's what I'm trying:
>
> column date_column new_value today
> SELECT 'm:\home\Big Share\Uploads\2006
> Fall\'||to_char(sysdate,'yymmdd')||'.txt' date_column FROM dual;
> spool &today
>
> I'm getting a message that says it is illegal. I've tried
> double-quotes and even no quotes. I'm not sure how to make this work.
>
> One other question, how can you make is so that the .lst is not
> appended to the filename? I also want to say to a file without an
> extension.
>
> I'm using Oracle 9i on a WinXP workstation.
>
> Thank you very much in advance!!!
> Greg
Are you getting this message (please always be as specific as possible and try to avoid forcing people in reproducing your problem) SP2-0333: Illegal spool file name: "m:\home\Big Share\Uploads\2006 Fall\061009.txt" (bad character: ' ')
Oracle has never allowed NTFS file names, so you either must use DOS
file names (without spaces and the like) or you must use the hidden DOS
names.
Question: Did you look up the error message? To me the problem is
immediately clear, and I have no doubt the 'feature' is documented.
You would best try to avoid to ask questions with obvious answers.
To spool a file without extension, just add a trailing dot.
-- Sybrand Bakker Senior Oracle DBAReceived on Mon Oct 09 2006 - 09:59:12 CDT
![]() |
![]() |