I trying to use the BULK INSERT command to insert data into a table.
The table has an insert trigger. The problem is that the trigger is
fired only once for the whole bulk. The trigger is fired only for the
last row inserted in the table.
HELP?A trigger is probably not the best idea for a table if you need it to fire
for every row of a BULK INSERT.
Rather, I would mae part of the BULK INSERT process call a stored procedure
that operates on that portion of the table in a set-based operation.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"GS" <gulpreet.sandhu@.conservation.ca.gov> wrote in message
news:32b5b09a.0401301046.5fcfcd9e@.posting.google.com...
> I trying to use the BULK INSERT command to insert data into a table.
> The table has an insert trigger. The problem is that the trigger is
> fired only once for the whole bulk. The trigger is fired only for the
> last row inserted in the table.
> HELP?|||Hi,
Can you remove the FIRE_TRIGGERS option from Bulk insert statment, this will
ensure that trigger is not getting fired during Insert.
Thanks
Hari
MCDBA
"GS" <gulpreet.sandhu@.conservation.ca.gov> wrote in message
news:32b5b09a.0401301046.5fcfcd9e@.posting.google.com...
> I trying to use the BULK INSERT command to insert data into a table.
> The table has an insert trigger. The problem is that the trigger is
> fired only once for the whole bulk. The trigger is fired only for the
> last row inserted in the table.
> HELP?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment