Prev: SQL server connection
Next: Snap-in creation failed
From: ilo on 11 Oct 2006 01:53 ok i did it your way first i dropped trigger and i set on queryidentifier and ansi null on and then i created trigger your way then it works thanks for you advice Erland Sommarskog yazdi: > ilo (ilyas.isik(a)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(a)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 |