Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Trigger for each row
Hi,
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

Report this thread to moderator Post Follow-up to this message
Old Post
jouj
01-30-06 02:23 PM


Re: Trigger for each row
If 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.


Report this thread to moderator Post Follow-up to this message
Old Post
Jens
01-30-06 02:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:38 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006