|  | Posted by Erland Sommarskog on 09/20/06 16:53 
ilo (ilyas.isik@gmail.com) writes:> its working
 >
 > i changed set options in cursor statement
 
 Maybe it's "working" but there are serious performance problems with the
 code. Those SET statements causes the trigger to be recompile twice
 during execution which is completely unnecessary. And the cursor can be
 a complete disaster for performance.
 
 I don't know why you are wrting triggers in the first place, but I someone
 - a client or an employer - pays you for it. Whatever, it is complete
 irresponsible to leave code like this, not the least when you have been
 told what the appropriate procedures are.
 
 Please remove that cursor and take out those SET statements, and ionsted
 save the trigger correctly.
 
 --
 Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
 
 Books Online for SQL Server 2005 at
 http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
 Books Online for SQL Server 2000 at
 http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
  Navigation: [Reply to this message] |