i need to insert a shell var into sqlplus, sqlplus needs to run an sql file but i want to make the direcroty of the sql file dynamic by var.
thanks.
Printable View
i need to insert a shell var into sqlplus, sqlplus needs to run an sql file but i want to make the direcroty of the sql file dynamic by var.
thanks.
accept sqldir prompt 'Dir: '
@&sqldir/sqlscript
You could do something like:
Code:#!/usr/bin/ksh
v_dir=/tmp
sqlplus -s scott/tiger @${v_dir}/test.sql