July 6, 2011 at 2:48 am
i am uploading files into a table.
i have a column of datetime with a default value of GETDATE().
the problem is, that even if i upload takes 30 seconds, the time in the column between the first and last line are the same.
any way to overcome this?
July 6, 2011 at 3:21 am
In order to have different timestamps on every row, you would have to change the batchsize to "1", but it would end up slowing down everything and I'm not sure this is what you want.
Hope this helps
Gianluca
-- Gianluca Sartori
July 6, 2011 at 11:15 am
It sounds like you want to know the row in the database that corresponds to the first line in the file, and the second, and so on. To do that the only way is to set the batch size to 1. Here is a thread with a demo:
http://www.sqlservercentral.com/Forums/FindPost1127805.aspx
It makes use of an identity column to know to which line in the file each row corresponds.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply