Hmmmh I have a stinker of a delete to look at and have not a clue, bit more complex than the average I feel.
Table A sys_id, sys_type, security_id
Table B sys_id, sys_ver_id, release
one entry in A can have multiple in B but the sys_id should be maintained throughout and new sys_ver_id values added as the releases increase.
Unfortunately a loader program has decided that rather than
grab the existing sys_id from A when updating or expanding a new release on a particular security_id, it will instead create a whole new rec in A and a corresponding one in B.
Leads to having anything from 2 -> 20 repeated A & B recs against a particular security ID.
Ideally I'd like to delete all but one rec for A against the individual security_id and then tie the B recs all to that sys_id.
Hope I've explained this someway sensible any ideas where to start with this ??
Cheers,
Mully