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: !! URGENT - need Help !!

Re: !! URGENT - need Help !!

From: replace this with _at_ <_at_)xs4all.nl>
Date: Sun, 11 Oct 1998 17:46:23 GMT
Message-ID: <3620da9c.691314@news.xs4all.nl>


Hello Mathias,

>For your solution i have to know the primary key fields to build the
>statemant. The build of the primary keys are coded in the application. So i
>dont know the field names of the pk :-(

Then how will you know if a row is inserted twice? By evaluating each field?

>I have this problem with more than 800 tables. I have to write a little
>programm to generate am complete scrpit for repairing the tables.

Maybe you should use dynamic sql.

declare
  cursor c is
  select table_name
  from user_tables;
begin
  for r in c loop
    /* Loop tables by opening it one by one dynamically, which I do not have experience with */
  end loop;
end;

You can order the tables by the significant (or all) fields and delete every row that is equal to the first.

Good luck!


Received on Sun Oct 11 1998 - 12:46:23 CDT

Original text of this message

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