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 -> Writing a general update procedure..

Writing a general update procedure..

From: <tjmxyz_at_my-deja.com>
Date: Mon, 23 Aug 1999 11:05:08 GMT
Message-ID: <7pr9t1$r09$1@nnrp1.deja.com>


Hi...

I want to write a general Update Procedure.

What I do now is for each table I have a function like.

CREATE TABLE t1
(

col1 Number(2),
col2 varchar2(20)
);

CREATE OR REPLACE PROCEDURE t1_update
(incol1 number,

 incol2 char
) IS

BEGIN
 update t1 set col1=incol1 and col2=incol2; END; More or less this is the idea.
But what if I change the name of col1 to something else...

I do this because there is some more processing for some records to other tables and such...

But My problem is some tables have many columns and in this stage columns are changing frequently...

How can I build a generalized function where the columns are generated at call time.

Is there any other ideas for an update procedure???

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Aug 23 1999 - 06:05:08 CDT

Original text of this message

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