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: insert into table , where the table name is a parameter

Re: insert into table , where the table name is a parameter

From: Mark D Powell <mark.powell_at_eds.com>
Date: 7 Jun 2002 06:18:15 -0700
Message-ID: <178d2795.0206070518.222848ac@posting.google.com>


tsachis_at_boi.gov.il (zachi) wrote in message news:<6af31984.0206062226.10454d6c_at_posting.google.com>...
> Hi
> I want to write a procedure that insert into table which its name is pass
> to the procedure as a parameter
> i.e
> procedute temp(tab varchr2) is
> begin
> insert into temp values(etc...)
> ofcourse that the tab name erresent a table which has the appropiate coloums
> please help me
> p.s
> what is IN parameter

Look up the 'execute immediate' statement and Dynamic SQL in the PLSQL manual. I would suspect that you would also need to pass the values to be inserted.

If by chance what you want to do is update a table where each user has his or her own version of the table then look up 'invoker rights' procedures. This would allow you to write and store the code one time and then use it for multiple users.

HTH -- Mark D Powell -- Received on Fri Jun 07 2002 - 08:18:15 CDT

Original text of this message

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