Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL parameter &0
pbewig_at_swbell.net (Phil Bewig) wrote in message news:<455f7154.0409160629.76d2a86_at_posting.google.com>...
> In a PL/SQL script run by the START command, I can refer to the
> parameters that follow START as &1, &2, and so on. However, it
> appears that &0 does not refer to the script name, as in C. Is there
> any way to determine the name of a script within the script while it
> is running?
>
> Many thanks,
>
> Phil
Define the name of the script within it.
E.g. test.sql:
DEFINE SCRIPT_NAME="test.sql"
PROMPT The name of this script is &SCRIPT_NAME
If you create this script dynamically then parameterize the value of SCRIPT_NAME.
E.g. for Windows 2k, test.bat:
@echo off
del %1
echo DEFINE SCRIPT_NAME="%1" >> %1
echo PROMPT The name of this script is ^&SCRIPT_NAME >> %1
Run as c:\>test.bat script_name Received on Fri Sep 17 2004 - 04:28:01 CDT
![]() |
![]() |