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 |
|
cblatchford
Starting Member
40 Posts |
Posted - 2006-01-10 : 11:05:34
|
| Hi chaps,Could someone show me how to compile a trigger which inserts the modified row into another table? I have the following currently..CREATE TRIGGER [PeopleUpdate] ON [dbo].[People] FOR UPDATE, DELETE, INSERTASinsert into peopleupdate (pplfirstname, updatetime)select (pplfirstname) as pplfirstname, getdate() from peopleThis simply returns all the entries in the people table! ThanksCB |
|
|
cblatchford
Starting Member
40 Posts |
Posted - 2006-01-10 : 11:17:14
|
| ..so for example if someone updates/deletes/inserts a record in the people table, I want that same record to be inserted into a new table, peopleupdate. |
 |
|
|
cblatchford
Starting Member
40 Posts |
Posted - 2006-01-10 : 11:25:47
|
| OK, obviously i was missing the "from inserted" code...oh dear :-) |
 |
|
|
|
|
|