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 |
|
dinbougre
Starting Member
2 Posts |
Posted - 2001-12-04 : 08:42:10
|
| I use Visual Basic and in my program I made a delete on the databasewhen I delete a record I want the trigger to look in another table in order to delete every record which was link to the deleted recordmy code is:[g]CREATE trigger t_entite_delete on t_entitefor delete as begindeletet_rolefromdeleted d,t_role twhere t.entite_id = d.obj_idend[/g]It works when the trigger delete one record but when he has to delete more than one he stop and tell me that too much row were concerned, so how to do? what is the problem?I read all old topic about cascade delete but my case is without FK the error message is that too much rows are concerned by the update (but I want to delete not to update) |
|
|
johnsoar
Yak Posting Veteran
66 Posts |
Posted - 2001-12-04 : 22:22:20
|
| Is entite_id unique? Usually this stems from trying to delete from a table where the column used in the join(entite_id ) is not unique. To many rows match the join criteria. You should change the join to use a column who's values are unique. If this is not the case, post the sql-error to give us a better idea of what the actual problem is.Adam |
 |
|
|
|
|
|