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 |
|
tohariganesh
Starting Member
1 Post |
Posted - 2008-11-13 : 07:55:19
|
| FriendsI am new to SQL. Please help in writing a trigger in SQL server.I have a table called ams_attendance in amsmum database. whenever the table gets inserted/updated i want the updated/inserted entries to be replicated in ams_attendance in amsggn database.Please help me.ThanksHG |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2008-11-13 : 08:26:04
|
| CREATE TRIGGER [trg_Insertams_attendance ] ON ams_attendance AFTER INSERTAS BEGIN INSERT INTO amsggn.ams_attendance (colomns) SELECT columns FROM INSERTEDEND |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-13 : 08:46:35
|
quote: Originally posted by lionofdezert CREATE TRIGGER [trg_Insertams_attendance ] ON ams_attendance AFTER INSERT,UPDATEAS BEGIN INSERT INTO amsggn.ams_attendance (colomns) SELECT columns FROM INSERTEDEND
if you have to track updates also.Also i guess amsmum and amsggn databses are in same server. |
 |
|
|
|
|
|