Re: using parameters in PL/SQL
Date: Sat, 20 Jan 2001 00:56:25 GMT
Message-ID: <94annm$gp1$1_at_nnrp1.deja.com>
In article <94ak8c$dsc$1_at_nnrp1.deja.com>,
Bill <wsprouse_at_my-deja.com> wrote:
> Hello all,
>
> 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.
>
> Thanks.
>
> Sent via Deja.com
> http://www.deja.com/
>
CURSOR map_cur ( varchar ffid) IS ^^^^^^^^^^^^^^^
Cursors can have variables. The ffid variable within the cursor would not need quotes as Oracle knows that the variable is a varchar.
Read up on cursors in the manuals!!!!
-- Michael Krolewski Rosetta Inpharmatics mkrolewski_at_rii.com Usual disclaimers Sent via Deja.com http://www.deja.com/Received on Sat Jan 20 2001 - 01:56:25 CET