Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 table with relationship to other tables.

Author  Topic 

vwilsonjr
Starting Member

45 Posts

Posted - 2003-04-15 : 16:55:45
I was given a database with about 200 tables in it. The company that built it is nolonger around. The problem I have is that there is one table that has duplicates in it. I need to know how I can tell what table(s) relay on this tables records. I want to delete the duplicates and make sure that I dont create any orphan records in the processs. I looked through BOL but not sure of what I'm really looking for.

Thanks for any input.

Thank God for Forums.

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2003-04-15 : 19:23:44
I guess there's no chance they actually created foreign keys etc?

Have a look at INFORMATION_SCHEMA in BOL
- eg
select * from INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS

If they haven't created foreign keys and primary keys then it's going to be more fun....

Let us know how you get on...

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page
   

- Advertisement -