Commandfile Parameters

agent86

Member²
Hi,

It does not appear the commandfile option will allow you to pass parameters to a script. For example:

plsqldev userid=scott/tiger commandfile=d:\tmp\test.sql scott

if d:\tmp\test.sql was

select * from all_users where username = upper('&1');

Once PL/SQL Developer Starts it always prompts for 1 where as calling the script from the command window works fine:

SQL> @d:\tmp\test.sql scott

USERNAME USER_ID CREATED
----------- ------------- ---------
SCOTT 184 11/19/2006

The following post leads me to believe that it will work:

http://www.allroundautomations.com/ubb/ultimatebb.php?ubb=get_topic;f=3;t=000971#000005

Partial Quote from Marco:
"or from the Windows Command Prompt (by using the commandfile=[script] parameter)"

Seems like it does not pass along the parameters.
Can you please verify this in case Im doing something wrong?

P.S. My version is 7.1.3.1381

Thanks
 
It is indeed not possible to pass parameters to the command file. The quote you included refers to the commandfile parameter, not to a parameter passed to the command file.
 
Marco Kalter said:
It is indeed not possible to pass parameters to the command file. The quote you included refers to the commandfile parameter, not to a parameter passed to the command file.

Just checking since this response was given to verion 7, 4 years ago.

Is it still not possible to pass parameters to a command file?
 
Back
Top