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!

howto check substitution variable in sqlplus

47564Oct 23 2009 — edited Nov 2 2009
Hi all,

Is there a way to pass a parameter to a sql script (&1) and set a default if the parameter was not passed.
This should be possible without sqlplus asking for OBJECT_OWNER at runtime.

Something like IFDEF would be fine ;-)

DEFINE OBJECT_OWNER = nvl(&1,'OO')

PROMPT Run for schema: &OBJECT_OWNER

thanks for your help
chris
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2009
Added on Oct 23 2009
13 comments
5,457 views