Wrathchild
Technical User
It seems using an external file to house the SQL is SOP for working with Oracle from a shell script. I have examples of this, but I'm trying to go a different route.
I was wondering if the SQL could just be in a variable and then pass that variable to the sqlplus command instead of referencing an external file? I'm using a Korn shell.
Something like:
export SQL
SQL="SELECT blah blah blah"
sqlplus -L -S user/password@db @ $SQL
I was wondering if the SQL could just be in a variable and then pass that variable to the sqlplus command instead of referencing an external file? I'm using a Korn shell.
Something like:
export SQL
SQL="SELECT blah blah blah"
sqlplus -L -S user/password@db @ $SQL