Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: !! URGENT - need Help !!
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!