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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help on PL/SQL

Re: Help on PL/SQL

From: Shawn Odekirk <shawno_at_erudite.com>
Date: 1997/03/21
Message-ID: <01bc360a$a3d74be0$050264c8@Shawno.erudite.com>#1/1

> Hi,
>
> I have a question to ask:
>
> I need to create a stored procedure which contains a string
> type parameter, say
>
> CREATE OR REPLACE proc_1(fieldname CHAR)
> ....
>
> Now, suppose the actual parameter I am passing is a field
> name in a table, my question is How I am able to run a
> SQL statement, something like this:
>
> SELECT "fieldname" from table1;
>
> Is there any way to do this? Any input is highly appreciated.
>
> Thanks.
>
> BC

You need to use the DBMS_SQL package. It contains functions to create an SQL statement on the fly an execute it.
If there is interest I can post a sample here.

Shawn Received on Fri Mar 21 1997 - 00:00:00 CST

Original text of this message

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