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: Reference an arbitrary number of tables?

Re: Reference an arbitrary number of tables?

From: Ed Stevens <Ed.Stevens_at_nmm.nissan-usa.com>
Date: Wed, 29 Sep 1999 12:17:55 GMT
Message-ID: <7st01b$uca$1@nnrp1.deja.com>


Name all the related tables in a consistant manner. "SELECT TABLE_NAME FROM DBA_TABLES WHERE TABLE_NAME LIKE ...." will give you a result set of the tables you want to process.

In article <37F1795F.BCE6F613_at_hotmail.com>,   Jay <manongjay_at_hotmail.com> wrote:
> Is the ff. possible?
>
> Suppose we have an arbitrary number of tables:
> create table foo_one (id NUMBER);
> create table foo_two (id NUMBER);
> create table foo_three (id NUMBER);
> ...
> create table foo_N (id NUMBER);
>
> Then suppose we need to insert values into these tables:
> insert into foo_one(id) value(1);
> insert into foo_two(id) value(2);
> insert into foo_three(id) value(3);
> ...
> insert into foo_N(id) value(N);
>
> Is it possible to create a stored procedure that will
> simplify the above insert for N number of tables???
> If so how?
>
> Thanks in advance.
>
>

--
Ed Stevens
(Opinions are not necessarily those of my employer)

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Sep 29 1999 - 07:17:55 CDT

Original text of this message

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