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: PLSQL: how to test if a table exists?

Re: PLSQL: how to test if a table exists?

From: NoName <nobody_at_nowhere.com>
Date: Fri, 5 Dec 2003 09:18:09 +0100
Message-ID: <bqpe1d$133$1@grillo.cs.interbusiness.it>


Thank you everybody. Maybe a little environment explantion of my problem is needed.

In our application, I added a new table for quite critical purposes, but our customers can choose whether using just the "old" table or even the new one. The old and new table are "read-only" for our customers, that is, there is no way, through the application, to modify the data. Both table datas are updated from us, using an SQL script, periodically.

The SQL file I send to our customer, is likely:

truncate table A

insert into A ...
insert into A ...
insert into A ...

commit;
truncate table B
insert into B ...
insert into B ...
insert into B ...

commit;

Since all custumers have for sure table A, but some of them can have or not table B, I would have a way to test the existance of table B, before attempting to truncate and to insert rows. All the statements (test included) will go into one SQL script, which I give to our customers.

An error I had using my first solution, was a sort of "too many statements in block", or similar.
Oh, there are approx. 6000 inserts.

Regards Received on Fri Dec 05 2003 - 02:18:09 CST

Original text of this message

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