简体   繁体   中英

Rowversion field causes BULK INSERT to only import every other row

When I perform a BULK INSERT into a table with a rowversion field, only every other row gets imported.

Here's my source text file:

在此处输入图片说明

If I perform a BULK INSERT into a table with a rowversion field, only two rows are imported:

在此处输入图片说明

However, if I do the exact same thing but comment out the rowversion field, all four rows are imported:

在此处输入图片说明

Is this a bug in SQL Server? Am I doing something wrong? Is there a way to BULK INSERT into tables with rowversion columns?

I found one workaround , but it will require creating and dropping a view to do the bulk insert. It's not a huge deal in my case, since I'm automating the whole process anyway, but I'd still like to know if there is some way to better deal with this without having to create a temporary database object to do it.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM