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 |
|
jogin malathi
Posting Yak Master
117 Posts |
Posted - 2007-03-29 : 01:09:48
|
| ALTER TRIGGER Trigger1 ON countries FOR UPDATE AS begininsert into country1select * from updatedendAbove trigger is been saved in sql 2005 query windowBut if i execute any update stmt as" update countries set cname='malathi' where cid=3 "it shows following errorInvalid object name 'updated'.Malathi Rao |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-03-29 : 01:11:23
|
| Try "INSERTED" instead of "UPDATED" if you want new values.If you want the old values, try "DELETED".Peter LarssonHelsingborg, Sweden |
 |
|
|
jogin malathi
Posting Yak Master
117 Posts |
Posted - 2007-03-29 : 01:20:18
|
quote: Originally posted by Peso Try "INSERTED" instead of "UPDATED" if you want new values.If you want the old values, try "DELETED".Peter LarssonHelsingborg, Sweden
Thanq it works perfectMalathi Rao |
 |
|
|
jogin malathi
Posting Yak Master
117 Posts |
Posted - 2007-03-29 : 01:22:01
|
| For storing this old values we hav to create new tablesWriting this type of triggers are helpfull in auditing databaseMalathi Rao |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-03-29 : 01:59:11
|
quote: Originally posted by jogin malathi Writing this type of triggers are helpfull in auditing database
They are? I have to remember this.Peter LarssonHelsingborg, Sweden |
 |
|
|
jogin malathi
Posting Yak Master
117 Posts |
Posted - 2007-03-29 : 02:29:12
|
quote: Originally posted by Peso
quote: Originally posted by jogin malathi Writing this type of triggers are helpfull in auditing database
They are? I have to remember this.Peter LarssonHelsingborg, Sweden
Sorry to say but i did'nt get YOUMalathi Rao |
 |
|
|
|
|
|