Re: SQL PLUS control and command line variables
Date: Thu, 21 Mar 2002 14:07:48 +0300
Message-ID: <a7cdpf$15o2$1_at_josh.sovintel.ru>
Hi David !
Below is the example of code you need:
column script_name new_value script_name select decode(&1,'ABC', 'script_for_abc',
'BCD', 'script_for_bcd', 'script_for_others') script_namefrom dual;
start &script_name
I hope this helps you
Regards !
Valery.
"David Alexander VanHorn" <dvanhorn_at_emba.uvm.edu> wrote in message
news:Pine.GSO.4.20.0203201941520.28578-100000_at_mansfield.emba.uvm.edu...
> I am trying to write a SQL PLUS script that checks the value passed on the
> command line and then takes appropriate action, something like this psuedo
> code...
>
> if &1 == foo
> _at__at_fooscript
> else if &1 == bar
> _at__at_barscript
>
> But I don't see how this can be accomplished in sql plus. Are there even
> any control structures available (ie "if" or an equality operator) in sql
> plus?
>
> ideas?
>
> Thanks,
> David
>
Received on Thu Mar 21 2002 - 12:07:48 CET