Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: BCP ordering? Date: Sat, 11 Jun 2011 00:05:46 +0200 Organization: Erland Sommarskog Lines: 19 Message-ID: References: <8d9b7401-207c-4c90-bac1-c99f98783b3b@r2g2000vbj.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="DD6dU+BfJNjsjSP4/K/V7w"; logging-data="21351"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Ozf03t+QWkbiWZSpRwP9I" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:90ZeO4e+qgX1OIxkrPDNRK/1+Hc= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:428 blindsey (blindsey@dsicdi.com) writes: > Can I generate an identity column when importing using BCP that will > sequence by the physical order of the records? I was told by SQL Server developers that you cannot rely on this. So I submitted a Connect item to call for this: http://connect.microsoft.com/SQLServer/feedback/details/278452/there-needs-to-be-a-way-to-preserve-order-when-bulk-loading-a-file And I was told, that order is in fact guaranteed. To be honest, I don't know what to believe. Try it, but keep your eyes open. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx