Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> getting a count of arguments

getting a count of arguments

From: Sarah Officer <officers_at_aries.tucson.saic.com>
Date: Fri, 09 Jul 1999 09:30:34 -0700
Message-ID: <378623AA.23EF2D09@aries.tucson.saic.com>


I have created a sql script that can be invoked by START. It requires a couple arguments, which I reference in the script by using &1, &2, ... I would like to put a statement at the top of my sql script which exits with a message if the exact number of arguments is not given; something like

     if(#* != 3)
        prompt "This script requires three arguments:"
        prompt "   foo - the first arg"
        prompt "   bar - the second arg"
        prompt "   baz - the third arg"
        exit
     endif;


     create ....
     insert ....where '&1'...and '&2'... and '3' ....

     exit


How can I write this in sql? Can I get the number of arguments and compare it to a desired value?

Thanks,

Sarah Officer
officers_at_aries.tucson.saic.com Received on Fri Jul 09 1999 - 11:30:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US