ontopofmalvern
Registered User.
- Local time
 - Today, 10:55
 
- Joined
 - Mar 24, 2017
 
- Messages
 - 64
 
Hi
I'm doing a bit of house cleaning on a project I use to manage school data. I have come across a duplicate record in my student table (i.e. same student entered twice each with its own auto number PK). Obviously I want to delete one but before doing so I wish to check the PK hasn't been used in any of the tables it is related to. Each student can be referecened by PK in 30+ tables. All the relationships for student ID have 'Cascade Delete and Update checked.
Is there an easy(?) way to search entire database for uses of a particular PK (and maybe even change it when it finds it). This is partly an acadmic question as in this case it is not a herculain task to just have a peak in each table but I think this is the sort of thing I should know how to do and I feel instinctively it should be very doable.
Many thanks for any help.
Richard
 I'm doing a bit of house cleaning on a project I use to manage school data. I have come across a duplicate record in my student table (i.e. same student entered twice each with its own auto number PK). Obviously I want to delete one but before doing so I wish to check the PK hasn't been used in any of the tables it is related to. Each student can be referecened by PK in 30+ tables. All the relationships for student ID have 'Cascade Delete and Update checked.
Is there an easy(?) way to search entire database for uses of a particular PK (and maybe even change it when it finds it). This is partly an acadmic question as in this case it is not a herculain task to just have a peak in each table but I think this is the sort of thing I should know how to do and I feel instinctively it should be very doable.
Many thanks for any help.
Richard