Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Parameters with spaces

Parameters with spaces

From: Bill Becker <beckerb_at_dgabby.mfldclin.edu>
Date: Thu, 27 Apr 2000 15:41 CDT
Message-Id: <10480.104355@fatcity.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US