sqlplus substitution variables

  • From: "LS Cheng" <exriscer@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 28 Dec 2007 19:27:48 +0100

Hi

Writting some informix migration scripts here and just got a bit stucked.

When we invoke sql scripts in sqlplus with arguments such as

@test.sql par1 par2 par3

par1, 2 and 3 can be treated as &1, &2 and &3

I have a situation where the number of arguments can vary so I can have from
par1 only up to par3 inclusive.

Basically does anyone know if there is something similar as $# in ksh but
for SQLPLUS? Or anyway to treat do something like NVL('&2', ';') (this does
not seem to work as it prompts and asks for a value)

Thanks

--
LSC

Other related posts: