SQL Server Performance Forum – Threads Archive
trigger in sql server 2000Hello everyone, i m using SqlServer 2000 and i have 2 tables : The 1st Table is : "UserActivityLog": (With following column names)
IPAddress The 2nd Table is : "SessionOnline" (With following column names)
IPAddress now i want to write a Trigger (Before), After insertion in the first table the inserted values
automatically goes to the 2nd table."SessionOnline" but for the specific SessionID.
e.g. if i make some new insertion in table 1 and write sessionID =1 for 1st insertion after insertion , i make
new insertion again in the table1 and for the same sessionID =1 then my 2nd table updates with the new
one entry. As for 1st table i made 3 insertion for sessionID=1 then in my 2nd table the last inserted value goes to the 2nd
table. (Each time my 2nd table Updated if i make new insertion for the same sessionID) coz in 2nd table
for each sessionID i have only one entry in the 2nd Table "SessionOnline".
plz reply me asap
its very urgent.plzzzzzzzzz
There are few good examples in books online in this case, have you referred them. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing.