DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: spool to location

  1. #1
    Join Date
    Dec 2002
    Posts
    89

    spool to location

    How to spool to location which has a space in folder name:
    column dcol new_value mydate noprint

    select 'w:\Risk Control\public\Reports\'||to_char(sysdate,'YYYY\MM\MMDDYYYY') dcol from dual;

    spool &mydate\rest.txt;

    select sysdate from dual;

    spool off;

    It works fine when i take space out like :
    Risk Control to RiskControl

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166

    Re: spool to location

    You can use the short name. do a dir/x in dos from the w: drive and it will give you the 8.3 version of the directory.

  3. #3
    Join Date
    Dec 2002
    Posts
    89
    ????????? no clue

  4. #4
    Join Date
    Jan 2001
    Posts
    3,134
    Rename the folder with an underscore.
    I remember when this place was cool.

  5. #5
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Originally posted by kpate
    ????????? no clue
    Have you ever clicked on start, then run and typed in cmd and enter? That would bring you to the dos prompt. Enter "W:" and enter to go to the W: drive and then type "dir /x" and then enter to see all of the files in that directory using a short name.

    Back when Windows 3.11 was out and it was a 16 bit operating system being able to create a file name larger than 8 characters was a new thing. So in addition to the long name every file had an abbreviation consisting of the first 6 letters a "~" or tilde and a number signifying the name of the file.

    There fore the short name for "Risk Control" would probably be "riskco~1". If it were a text file it would be something like "riskco~1.txt". Hence 8.3, an 8 character name with a 3 character extension.

    Or you could just change the space to an underscore.

  6. #6
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    If you ever worked with a real operating system instead of a "pretty" face on top of DOS you would know to:

    Code:
    SQL> spool "c:\Documents and Settings\jhunter\foobar.out"
    Last edited by marist89; 02-11-2005 at 01:06 PM.
    Jeff Hunter

  7. #7
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Originally posted by marist89
    If you ever worked with a real operating system instead of a pretty face on top of DOS you would know to:

    Code:
    SQL> spool "c:\Documents and Settings\jhunter\foobar.out"
    Hmmmm. I just assumed that it would work.
    Maybe there is a setting missing in my Oracle client.

    Code:
    SQL> spool "c:\Documents and Settings\jhunter\foobar.out"
    SP2-0333: Illegal spool file name: ""c:\Documents and Settings\jhunter\foobar.out"" (bad character:
    That is the first time I ever heard you call Windows a pretty face!

  8. #8
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    There, edited for sarcasm effect...
    Jeff Hunter

  9. #9
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Originally posted by marist89
    There, edited for sarcasm effect...
    That's much better.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width