FIX: BULK INSERT with BATCHSIZE Disregards LASTROW Parameter

ID: Q196790


The information in this article applies to:

BUG #: 53028 (SQLBUG_70)

SYMPTOMS

If you use the BULK INSERT command with the BATCHSIZE and LASTROW options in combination, the LASTROW command is ignored and all rows in the data file are imported.


WORKAROUND

Do not use BATCHSIZE in combination with the LASTROW option. Testing would seem to indicate, however, that if the batchsize is a 0 modulus of the lastrow, then the import will stop where requested.

You can also use the Bcp.exe command line utility as a workaround, if you need to use both the batchsize and lastrow arguments. Use the following command at an MS-DOS prompt:


bcp ?b<batch_size> -L<last_row> 


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 7.0. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server version 7.0. For information about downloading and installing the latest SQL Server Service Pack, see http://support.microsoft.com/support/sql/.

For more information, contact your primary support provider.

Additional query words: prodsql bcp


Keywords          : kbbug7.00 kbSQLServ700bug kbSQLServ700sp1fix 
Version           : winnt:7.0
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: June 7, 1999