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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-06-20 : 07:18:43
|
| richard clogg writes "Hi,I have a question regarding using triggers to update data that has just been updated in the same table. I have a table that gets updated regularly. One of the fields that gets updated is a date field. My problem is that the date that goes into this field is incorrect and I want to update it with a new date after the upate or insert. I have been trying to achieve this with triggers but I cannot seem to get the field to update. I have managed to update the field for all records but I cannot seem to update only the field that is updated. I understand that the inserted table conatins the new value so if I try and change the field is it overwritten with the new field from the inserted table?Is it maybe not possible to update a field with a trigger that is already being changed by an update/insert statement?Before you ask. I cannot change it in the code because i have no access to the source code of the productThanks,Richard" |
|
|
Thrasymachus
Constraint Violating Yak Guru
483 Posts |
Posted - 2005-06-20 : 09:55:06
|
| Why don't you post the code for the trigger that is not working?Sean RoussyPlease backup all of your databases including master, msdb and model on a regular basis. I am tired of telling people they are screwed. The job you save may be your own. |
 |
|
|
|
|
|