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: Lun Wing San (Oracle) <wslun_at_qrcsun.qrc.org>
Date: 1997/03/23
Message-ID: <3335A2D3.4A1B@qrcsun.qrc.org>#1/1

Biao Cheng (Sam) wrote:
>
> 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.

  You can use dynamic SQL. The package used is DBMS_SQL

---
Name   : Lun Wing San (Certified Oracle Database Administrator)

Title  : Oracle Database Administrator and System Administrator of QRC
Phone  : (852)27885841

This posting represents the personal opinions of the author. It is not the
official opinion or policy of the author's employer. Warranty expired when you
opened this article and I will not be responsible for its contents or use.
Received on Sun Mar 23 1997 - 00:00:00 CST

Original text of this message

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