Re: using parameters in PL/SQL
Date: Tue, 23 Jan 2001 17:02:50 GMT
Message-ID: <94kdfi$3i9$1_at_nnrp1.deja.com>
Daniel,
That did the trick - dumb mistake on my part.
Thanks,
Bill
In article <3A6A9EA7.B1041BFF_at_exesolutions.com>,
"Daniel A. Morgan" <dmorgan_at_exesolutions.com> wrote:
> > I have a procedure which accepts two parameters. I would like to
use of
> > the parameters, which is varchar2, in a select statement for a
cursor.
> > The name of the parameter is ffid. My select statement is:
> >
> > CURSOR map_cur IS
> > SELECT ARID.INSTALLATION.INSTALLATION_NAME,
> > ARID.INSTALLATION.FFID,
> > REPLACE(ARID.ARID_MAPS.MAP_RANGE_STATUS,'*',NULL) as Status,
> > ARID.ARID_MAPS.UPDATE_BY,
> > TO_CHAR(ARID.ARID_MAPS.UPDATE_DATE,'YYYYMMDD') as UpdateDate,
> > ARID.ARID_MAPS.INSTALLATION_SCANNED_MAP
> > FROM ARID.ARID_MAPS, ARID.INSTALLATION
> > WHERE ARID.ARID_MAPS.INSTALLATION_ID =
> > ARID.INSTALLATION.INSTALLATION_ID
> > AND ARID.INSTALLATION.FFID = ffid ;
> >
> > I want to use the ffid in the where clause as above. How do I get
the
> > quotes around ffid.
>
> Why would you want to?
>
> A SQL statement using a VARCHAR2 variable is a string by definition.
No
> single-quotes are required.
>
> I think your problem is poor variable naming. You should NEVER name a
> variable with the same name as an object in your database ... in this
case a
> field. Rename it to ffid_txt or v_ffid or something else and it should
work
> just fine.
>
> Daniel A. Morgan
>
>
Sent via Deja.com
http://www.deja.com/
Received on Tue Jan 23 2001 - 18:02:50 CET