View Single Post
  #5 (permalink)  
Old 02-09-10, 09:26
MCrowley MCrowley is offline
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,896
Rather than the cursor (which is usually suspect for performance problems), you should probably join to the inserted table in this case. Instead of
Code:
UPDATE dbo.Disciplinary_Action_Form
SET Name=@Name, EEno=@EEno
Where F_DocumentID = (select F_DocumentID from inserted)
You might have
Code:
UPDATE dbo.Disciplinary_Action_Form daf
SET Name=i.Name, EEno=@EEno
from inserted i 
Where daf.F_DocumentID = i.F_DocumentID
You will of course need to work EEno in there, but this should get you started.
Reply With Quote