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!

Conditional Use of ACCEPT

116556Apr 24 2002
I would like to use ACCEPT to prompt the user for parameters, if and only if there were no arguments (or too few) passed from a shell script or a START command. Essentially, the SQL*Plus script can run interactively with parameters prompted for or in batch with parameters just expected.

It appears that I cannot place the ACCEPT statement (SQL*Plus) inside of a PL/SQL IF/THEN block so I don't think that I check for arguments at run time and only prompt for input if no arguments were presented.

I would prefer a SQL*Plus solution for portability but an alternative seems to be to do this logic and prompting in a shell script (Windows or DOS .BAT, actually, and maybe this doesn't qualify as shell script) and always pass arguments into the SQL*Plus script.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 13 2002
Added on Apr 24 2002
6 comments
642 views