Link to home
Start Free TrialLog in
Avatar of wasabi3689
wasabi3689Flag for United States of America

asked on

spool usage

I have the following line working but I want to put the log file into a folder like myfolder
But the folder is not created previously.

When I run the program, it will auto create the folder?


spool create_my_views.log

Can I put this line like below?

spool myfolder\create_all_views.log
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wasabi3689

ASKER

If I pre-create the folder "MyFolder" before I run  spool, still use this line

spool myfolder\create_all_views.log

it works? I mean  the log file will go to MyFolder?
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

You could have tried this and had your answer in less time than it took to post this and wait for a reply.

>>>I mean  the log file will go to MyFolder?

Yes
If I pre-create the folder "MyFolder" before I run  spool, still use this line

spool myfolder\create_all_views.log

it works? I mean  the log file will go to MyFolder?

Yes, please put this
spool c:\myfolder\create_all_views.log
HuaMinChen,

This had already been posted.  Please review previous posts before posting.

Your post also adds the drive letter.  This may not be what is wanted and can lead to errors.  If they want the output in a sub- folder from the 'current' folder, the full qualification will not work.
I want the output .log go to its folder, not come out to the same folder as stored the .sql files. Otherwise, it will go to the same folder with all. sql files
>>I want the output .log go to its folder, not come ou

I understand this.  Adding the folder or fully qualifying the path will work.

Have you not tested it yet?
not yet. will do later