Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding multiple cascade paths
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
Database design
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01340693
Message ID:
01340740
Views:
8
You can replace one of ON DELETE CASCADE to RowColumns with a trigger.

>
>Given four tables:
>
>Lists
>Fields : ID
>
>Columns
>Fields : ID, ListId
>
>Rows
>Fields : ID, ListId
>
>RowColumns
>Fields: ID,RowId,ColumnId
>
>If a row in the Lists table is deleted then I want to cascade the delete to both the Columns and Rows tables.
>If a row in the Columns or Rows table is deleted then I want to cascade the delete to relevant rows in the RowColumns table.
>
>If I try to set this up using relationships I can cascade the delete to RowColumns from either the Columns or the Rows table but not both - that causes a 'multiple cascade path error'. How can I achieve the desired behaviour ?
>
>Regards,
>Viv
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform