Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: reading variables
Hello All
I use TOAD version 7.1.
When I run a select with & (like where id = &id) a pop up window ask for the
replacement value.
Yechiel Adar, Mehish Computer Services
adary_at_mehish.co.il
> -----Original Message-----
> From: Jacques Kilchoer [SMTP:Jacques.Kilchoer_at_quest.com]
> Sent: Thu, January 10, 2002 2:02 AM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: reading variables
>
> > -----Original Message-----
> > From: Lance Prais [ <mailto:lprais_at_ts.checkpoint.com>]
> >
> > I am using toad.
> >
> > >If I use the following for to reference a variable in my code:
> > >Update Primus_Temp_Dump set owner =(&test) where secure_id = Secure;
> > >
> > >I get this compile error:
> > >PLS-00103: Encountered the symbol "&" when expecting one of
> > the following:
> > >
> > >This is how you are supposed to reference variables in a SQL
> > Statement?
> > >
> > >If I do this:
> > >Update Primus_Temp_Dump set owner =('&test') where secure_id
> > = Secure;
> > >
> > >I do not get the error but it passes &test into my query and it fails
>
>
> What version of TOAD? I have 7.1 on my desktop, and I see the following in
> the help (searching for the word substitution):
>
> <<Window: Variables
> This window will come up if you specify parameters in your SQL query, from
> the SQL Edit window, such as:
> select * from employee where employee_id = :empid
> -OR-
> select * from employee where employee_id = &empid
> Once the variables window comes up, select each bound variable, select the
> data type, and enter the desired value. Click OK to run the resulting SQL
> statement.
>
> Note: Bound parameter substitution is NOT supported in anonymous PL/SQL
> blocks.>>
>
> I experimented with the feature and it worked as advertised in the help.
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This e-mail was scanned by the eSafe Mail Gateway
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-8?Q?=E0=E3=F8_=E9=E7=E9=E0=EC?= INET: adary_at_mehish.co.il Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Jan 10 2002 - 04:09:19 CST