Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Oracle 9iR2, HP-UX 11i, (How) Can I...?
I'm guessing my first answer is not going to pass the quote test. So,
This is a little indirect but:
host pwd > pwdfile.txt
Declare the file to be an external table and then select from it.
> Hi Everyone:
>
> Is it possible to determine the current working directory as I
> am running a SQL script from the command line?
>
> I have a script that I want to pass a file name, and I want the
> log file to be in the same directory as the script, which is not
> necessarily the same location as the passed file name. So I am
> trying to find a way to determine the current 'pwd', and feed that
> value to a utl_file.fopen call. Currently I prompt the user for
> the directory, but I'd like to find something smoother.
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Thu May 13 2004 - 15:28:59 CDT