> Greetings,
>
[quoted text clipped - 23 lines]
>
> Many Thanks!
Which platform?
On DB2 V8.1.4 and later let's first get rid of the self join:
delete from
(select row_number() over(partition by tranid order by extract_dt) as rn
from policy) AS D
where rn = 1
Do any of the tables or policy itself have any additional fancyness
(more delete cascade/restrict/no action), after delete triggers)?
Cheers
Serge

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
nekiv90@hotmail.com - 21 Apr 2006 01:32 GMT
Hi Serge,
It is on AIX 5.3 DB2 V8.2.2
The Policy table is parent table. The dependant tables could have more
than one RI (ie more than one 'delete cascade') with other tables in
addition to Policy table. Other RI relationship is 'on update no
action'. That will be it.
I'll test out the SQL as suggested.
Thanks again!
> > Greetings,
> >
[quoted text clipped - 37 lines]
> Cheers
> Serge