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.
| Author |
Topic |
|
giovi2002
Starting Member
46 Posts |
Posted - 2005-07-18 : 16:17:52
|
| Goal: Delete related records in another table by using a delete triggerStatus : It works but each time I delete I get the following message'Key column information is insufficient or incorrect. Too many rows were affected by update'Application : access project (adp) / Sql serverWhat I like: to get rid of the messageWhat do I think: I especially redesigned the trigger to delete the indexed unique field of the related table...so..what's more?Code of my trigger-----------------CREATE TRIGGER trg_deletekoppeltabel_rep_punctualiteiten ON [dbo].[REP_PUNCTUALITEITEN] AFTER DELETE ASDELETE dbo.koppeltabelWhere ID IN(Select ID From dbo.koppeltabel INNER JOIN deletedON dbo.koppeltabel.repautonummer=deleted.rpautonummer)Note: ID is an unique primary key;rpautonummer is really the name of the field in the deleted table (don't think of a mismatch as the trigger works except the nasty message) |
|
|
SreenivasBora
Posting Yak Master
164 Posts |
|
|
giovi2002
Starting Member
46 Posts |
Posted - 2005-07-18 : 17:14:30
|
| Thanks!!! I didn't tell but found out today that in query analyzer no probs with the code so this must be the cause. All I need to do then is to suppress the message, do you happen to know the suppress statement in a procedure/triggerisn't it set warnings off? |
 |
|
|
|
|
|