tags:

views:

86

answers:

2

How do I get the number of rows affected by a BULK INSERT on SQL Server (2008 if that matters)?

+1  A: 

Have you tried examining @@ROWCOUNT ?

(Note: you need to set a variable = @@ROWCOUNT before executing any other statement, otherwise its value will be reset)

Mitch Wheat
+1  A: 

Be careful if any triggers fire as a result of your BULK INSERT, as this may affect your result.