Re: sqlplus bind variable question

From: John Hurley <hurleyjohnb_at_yahoo.com>
Date: Wed, 29 Sep 2010 12:45:20 -0700 (PDT)
Message-ID: <01d99e9f-7eee-4c40-87dd-f8c0973d53ea_at_a19g2000yql.googlegroups.com>



On Sep 29, 11:53 am, Chuck <chuckh1958_nos..._at_gmail.com> wrote:
> Recently on an SR, Oracle asked me to run a SELECT that included bind
> variables named :1 and :2. Is it even possible to do that in sqlplus?
> The only way I know of to make it work is to change the variable names
> so that they start with a letter (eg :b1 and :b2). Is there a way to do
> it without changing the names?
>
> example:
>
> var 1 varchar2(20)
> exec :1 := 'abc';
>
> That doesn't work, but this does...
>
> var b1 varchar2(20)
> exec :b1 := 'abc';
> print b1

You have to work with the one out of the set of valid variable names in sqlplus ... 1 is not legal. Received on Wed Sep 29 2010 - 14:45:20 CDT

Original text of this message