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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 insert trigger and update trigger

Author  Topic 

tanu
Yak Posting Veteran

57 Posts

Posted - 2008-08-20 : 16:26:10
I have to write a trigger which will fire upon update or insert.
If we assign student to a dorm or we modify their room assignment, I need to take that room name and insert a new record in address table or if record already already exist for that addresstype i need to update that, get the @@identity and insert this addressid and studentid in the link table.

Is it possible to do this? I have just updated not insert with trigger.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-20 : 16:26:54
Yes it's possible. Show us what you have so far.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -