Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: Embedded in text file Date: Thu, 21 Jul 2011 11:05:31 +0200 Organization: Erland Sommarskog Lines: 26 Message-ID: References: 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="32709"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Na1iq17liMVyxK59qcqNf" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:CMnA8K4xDhK3SfbIuDCJ6DEHAfc= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:559 Kurt Dicus (kdicus@dicus.com) writes: > This would be a perfect file! > > IDSTATUSDESCRIPTIONACTIVE > 1activeTest description shorttrue > 2under constructionTest description 2false > > What the file actually looks like. > IDSTATUSDESCRIPTIONACTIVE > 1activeTest -- it is only the DESCRIPTION field that has the > premature break > description > long stringtrue > 2under constructionTest description 2false Have you tried to bulk-load this misfit with BCP or BULK INSERT? I belive that should work. They look for one field at a time, so when they look for the third field, they are looking for tab characters to terminate that field. The CRLF will be consumed as data. -- 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