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 |
GG
Starting Member
1 Post |
Posted - 2009-10-06 : 05:11:15
|
Do you know of a way of doing this.In a trigger, the row to be updated are given in the temp table "inserted"I want to say something like this in the instead of trigger:Update trackingSet audit=xx, [rest]=[inserted.*]From tracking tInner join inserted I on i.jobid = t.jobidGet the idea? I want all existing items of inserted to be used, but I want to change the value of one field onlyI am stuck, can some one pelase help |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-10-06 : 05:31:36
|
you have to specify the column name one by one. There is no shortcutUpdate tset col1 = i.col1, col2 = i.col2, . . . from tracking t inner join inserted i on t.jobid = i.jobid KH[spoiler]Time is always against us[/spoiler] |
|
|
|
|
|