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 - 2006-10-13 : 07:20:29
|
| netman writes "hiI know that the subject of my question is a little ambiguous but let me explain my case and then you can understand my problem.well we have a database with some tables that in each table we have some triggers I mean in one table we have 2 triggers that is sensitive by updating of a field for example for table t1 we have fields (a,b,c,d)trigger1 is sensitive on updating in field (a) and trigger2 is sensitive on updating field (d) in the body of trigger we have to make changes on that record that recently caused the trigger fired for example in the boddy of trigger we have to have :b=a and c=a and d=1if I am not wrong in mySQL we can write :UPDATE t1 SET b=NEW.a or for some circumstances (depends on the problem) :UPDATE t1 SET b =OLD.aI found a way in sql server like IDENTITY but it causes our tables get larger so would you please help me to find a suitable way to solve my problem.if there is not another way I have to use the IDENTITY waythanks for your attentionBest regards.netman" |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-13 : 07:26:47
|
| Use built-in INSERTED and DELETED special tables.Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|