X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109 Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!usenet-fr.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: BCP ordering? Date: Fri, 17 Jun 2011 23:35:12 +0200 Organization: Erland Sommarskog Lines: 26 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="25917"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BcGGeJr5jLcKytyRDJMrw" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:lCZcP+EqzneolgItb2Po2mNy6qg= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:467 Gene Wirchenko (genew@ocis.net) writes: > On Fri, 10 Jun 2011 06:18:07 -0700 (PDT), blindsey > wrote: >>Can I generate an identity column when importing using BCP that will >>sequence by the physical order of the records? > > What physical order? > > A file can be in chunks all over a volume. If you mean within > the file, the DBMS could write a row anywhere it has space to do so. > > You have to define an order if you want one. Gene, he is talking about reading a text file into SQL Server with the BCP command. Text files typically have a physical order. Well, if you want to talk disk blocks, that's really a logical order. But ordered they are. -- 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