Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding multiple cascade paths
Message
From
22/08/2008 15:05:40
 
General information
Forum:
Microsoft SQL Server
Category:
Database design
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01340693
Message ID:
01341218
Views:
11
Thx Sergey,

I was looking at using the 'INSTEAD OF' trigger but this in an AFTER is simpler. The only thing that threw me for a while was that the trigger fired when there was nothing to insert (ie INSERT INTO ...... (SELECT ......) caused the trigger to fire even if the select returned no records - that didn't seem very logical to me?

Regards,
Viv


>You can use Raiserror to cancel INSERT
>
>RAISERROR ('Ivalid value for ''ColumnsID'' column', 16, 1)
>
>
>>
>>Considered that too. But, as I understand it, the Insert has already occurred when the trigger fires so I'm not sure what best to put in the trigger.....
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform