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

Home -> Community -> Usenet -> c.d.o.server -> Re: Tablename as Parameter in Stored Procedure

Re: Tablename as Parameter in Stored Procedure

From: Luis Campos <lcampos_at_cpcis.pt>
Date: Fri, 20 Aug 1999 12:13:40 +0100
Message-ID: <7pjd53$mq9$1@duke.telepac.pt>


FORGET ABOUT DBMS_SQL !!!! If you are using Oracle8i you can make that 100% much easier like this:

EXECUTION_IMMEDIATE('my_string');

Where 'my_string' is your DML command. If you're doing SELECT statements, use the INTO clause of the EXECUTION_IMMEDIATE like this:

EXECUTION_IMMEDIATE('select my_column from '||table_name||

                                                    ' where
rowid='||rowidtochar(v_rowid))
INTO my_var;

If you're not using Oracle8i... just try to upgrade because the number of improvements is way too big.

Cheers.

Luis Campos.

Chittesh Mehta wrote in message <7pgbrp$qhu$1_at_coco.singnet.com.sg>...
>Hi,
>
>Is there any way to pass a tableName as parameter and
>get the certain value out of that table.
>
>Basically my stored procedure should take tablename and ROWID
>and then will do some processing on that Row of that table.
>
>(Basically select and update statement...)
>
>Any help is always welcome.
>
>Thanks
>
>- chittesh
>
>
Received on Fri Aug 20 1999 - 06:13:40 CDT

Original text of this message

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