passing variables into sqlplus [message #13400] |
Mon, 12 July 2004 05:06 |
Manfred Himmler
Messages: 6 Registered: July 2002
|
Junior Member |
|
|
In a UNIX Shell-Script I determine several variables out of a file, start sqlplus and then I will do sometime similiar like the following:
export REPORT=report01
export CUSTOMER=4711
Then after connecting to sqlplus in silent-mode I do START $REPORT $CUSTOMER. The variable $REPORT is correctly interpreted as report01.sql but not $CUSTOMER. In report01.sql I do a simple SELECT &1 FROM DUAL (for testing). When running I get the error
old 1: select &1 from dual
new 1: select $CUSTOMER from dual
ORA-00911: invalid character ($ from $CUSTOMER)
How can I pass a second variable (or third and so on) out of my UNIX-Environment into my start-command?
Thanks,
Manfred
|
|
|
|