Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi, MS SQL 2000. In some tables, my triggers on INSERT,UPDATE and DELETE are written using several UDF, and testings (large T-SQL Code). that's why I should use a cursor to run my code for each row affected by an Insert, Update and Delete. 1-Is there a better way to do this without using cursors? 2-And is there a way so that the tirgger fires on each row? (one row in inserted/deleted tables). reference: [Quote from BOL] Note The use of cursors in triggers is not recommended because of the potentially negative impact on performance. Use rowset-based logic rather than cursors to design a trigger that affects multiple rows. [/Quote] Regards jouj
Post Follow-up to this messageIf you are using UDFs, there is a chance to do this on a swetbased command. But unless you don=B4show us your code, we can help you further. The inserted / deleted data us present within the INSERTED and DELETED tables, so you can use them by joining to the existing (if any) data. HTH, jens Suessmeyer.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread