Hi
Praveen, March 12, 2003 - 4:48 am UTC
Tom,
You are so simple....
warm regards
Praveen
Ricky Dionisio, September 15, 2003 - 5:04 pm UTC
simple indeed.
Thanks,
Developer
A reader, September 12, 2005 - 3:14 pm UTC
It is extrem slow if the table has millions records. Is there an another to delete the duplicate record in the large table?
Thanks
September 12, 2005 - 3:22 pm UTC
the fastest way I've discovered to date is thus:
delete from t
where rowid in ( select rid
from ( select rowid rid, row_number() over
(partition by YOUR_KEY order by rowid) rn
from t)
where rn <> 1 )
delete statement
shams, September 13, 2005 - 1:03 am UTC
I have a table t1
ID actno type seq src
1 111 CHK 1 L
1 111 SAV 2 L
table t2
ID actno type seq src
1 111 CHK 2 GL
1 111 SAV 3 L
I want to delete the records in t2 for the records that has no sequence matching records in t1 and src != 'GL'.
In the given example
the following record from t2 should be deleted
1 111 SAV 3 L
and not the first record
Regards,
Shams
Try this out
Kamran, September 13, 2005 - 1:52 am UTC
delete from t2
where not exists
(select t1.seq from t1 where t1.seq=t2.seq);
delete
shams, September 13, 2005 - 10:47 am UTC
That does not work because the I do not want to delete the records from t2 if the t2.src = 'GL' .
The records in T2 are deleted only for the following criteria
t1.src = 'L' and t2.src = 'L'
t1.src = 'GL' and t2.src = 'GL'
and the records are not touched in t2 if
t1.src = 'L' and t2.src = 'GL'
Thanks
September 13, 2005 - 12:44 pm UTC
how to join those tables - do the id and acct columns have any meaning or is seq all that it is about.
delete
shams, September 13, 2005 - 4:54 pm UTC
id,acct_no and seq combination makes sense as
the extra records in t2 should be checked with the combination and delete the recods if the combination does not exits in the table t2.