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: Sending table as an object to procedure

Re: Sending table as an object to procedure

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 18 Jul 2002 20:25:19 +0200
Message-ID: <0t1ejugv5akkpc1u1051an0qbrm229ambt@4ax.com>


On 18 Jul 2002 10:53:09 -0700, rs_arwar_at_hotmail.com (Rauf Sarwar) wrote:

>Yes you can by using dynamic plsql. EXECUTE IMMEDIATE can do the trick.
>
>PROCEDURE Your_Proc (
> table_name_ IN VARCHAR2,
> pk_cols_ IN ..... -- Need Rowid or PK columns
> user_ IN VARCHAR2 )
>IS
> stmt_ VARCHAR2(500);
>BEGIN
> stmt_ := 'UPDATE ' || table_name_ || ' SET .....';
> EXECUTE IMMEDIATE stmt_;
> EXCEPTION
> WHEN OTHERS THEN
> ...
>END Your_Proc;
>/

This code will result in

  1. Excessive parsing
  2. in mutating table errors

But then it might be possible to run it as a background job.

Your advice above is absolute and utter crap. Try to *learn* Oracle.

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Thu Jul 18 2002 - 13:25:19 CDT

Original text of this message

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