script deleting duplicates in related records

  • Follow


Hello!

I have a DB with two tables with a many to many relationship.

Table X ;  Table b ; Table_XY

In table Y there are records that are duplicates except for the primary
key.  I want to get rid of the duplicates and update the table that
relates them to table X

So for a specific record, let's say I find 10 duplicates of record b in
table B, all with different primary keys.  I would need to find the
related records  in the join table ( TableAB) and then update them with
one of the foriegn keys corresponding to record b and then delete the
other instances in Table B.

Any ideas on how to script this?

Thanks!

Sadie

0
Reply sadiewms (8) 2/22/2006 12:53:48 AM


0 Replies
351 Views

(page loaded in 0.057 seconds)

Similiar Articles:













7/22/2012 11:20:36 AM


Reply: