Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Parameters with spaces
I know that you can pass env vars from unix to sqlplus via:
sqlplus name/password @file "$VAR1"
In the called script, the value of $VAR1 can then be referenced as '&1'. This works fine, except when $VAR1 is an expression containing multiple strings separated by spaces; then '&1' is interpreted as only the first string, up to the first space. The number of strings in the expression is variable, and the '&1' is used in the script in a WHERE clause: WHERE FIELD1 = '&1';
Does anyone know of a way to pass an expression from the unix shell to sqlplus, preserving all strings and spaces within the expression?
On Solaris 2.7, Oracle 8.1.6
Thanks to any who reply
beckerb_at_dgabby.mfldclin.edu
Received on Thu Apr 27 2000 - 15:41:00 CDT
![]() |
![]() |