Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> getting a count of arguments
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
![]() |
![]() |