Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calling a script with multiple parameters

nik_mApr 29 2010 — edited Apr 29 2010
Ok, this seems like it would be an easy question, but I've Googled this to death and I can't find anything. How do I pass multiple variables to a script? I have a script with three variables and only the first one is required. I'm wanting to do this from both the DOS command line and SQLPlus. The only difference is I would need the SQLPlus call plus login information when I call from DOS.

I've tried using single quote, double quotes, I've tried delimiting with a space, command and semicolon, but nothing works.
sqlplus user/pwd@db @"F:\Script.sql" variable1 "" variable3
When I run this, it still prompts me for all three variables. Again, only variable 1 is required. Variables 2 and 3 will more often then not be blank. Any help would be appreciated.

I'm on 10.2.0.4 if it matters.

Edited by: nik_m on Apr 29, 2010 9:18 AM
Ha. Guess cr*p is a bad word.
This post has been answered by Frank Kulash on Apr 29 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2010
Added on Apr 29 2010
8 comments
1,967 views