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!

Basic parameter passing to sql script

921009Apr 11 2012 — edited Apr 12 2012
Hi all,

Another newb question. I want to write a sql script that accepts a couple of command line parameters from the shell.

I've read that &1 will reference the first parameter and &2 the second and so on.

What is the proper way to capture the values in a variable in my script and test them for not being null, for being legit numbers, for there only being 2 parameters and for the second being larger than the first. Basic stuff in most languages, but I'm having trouble googling for good sql examples.

Thank you,

Scott
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 10 2012
Added on Apr 11 2012
6 comments
65,436 views