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)
 Weird SQL Server Cascade problem

Author  Topic 

Valein
Starting Member

13 Posts

Posted - 2003-10-17 : 08:10:37
I have 4 tables, table A, B, C, and D

Table A has a relation and foreign key in B and C with cascading delete and update. Tables B and C both have a relation and a foreign key in table D and cascading update and delete.

If I delete something in A, related records should be deleted in B and C, and records in D, related to B and C, should be deleted.

This is unacceptable to SQL Server 2000 which complains about cycling cascaded deletes.

Do you see anything wrong with this scenario?

Stian

Valein
Starting Member

13 Posts

Posted - 2003-10-17 : 08:41:59
Don't worry about it guys, I found the reason.

SQL Server 2000 does not allow more than one cascading path from a parent table to a child table.

I have to use a trigger to get this working the way I want.

Stian
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-10-17 : 08:50:23
Interesting what are stored in those tables?
Go to Top of Page

Lavos
Posting Yak Master

200 Posts

Posted - 2003-10-17 : 10:50:08
The alphabet of course :)

----------------------
"O Theos mou! Echo ten labrida en te mou kephale!"

"Where theres a will, theres a kludge." - Ken Henderson
Go to Top of Page
   

- Advertisement -