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 - 2004-02-12 : 07:53:14
|
| aaron writes "I would like to insert a new row if the update failsThis is what I have so far but I am not sure if I can access the values from the update to use in the insert.CREATE TRIGGER ClientIdUpdate ON [dbo].[newtracking] FOR UPDATEASDeclare @@clientid varchar(20)IF (select count(*) from inserted) > 0 returnelse Insert into newtracking (clientid) select clientid from inserted" |
|
|
Stoad
Freaky Yak Linguist
1983 Posts |
Posted - 2004-02-12 : 08:02:36
|
| Trigger is a kind of post-filter and it is envokedonly if an update statement was successful. |
 |
|
|
|
|
|