You are here: Re: Bulk Insert Questions « MsSQL Server « IT news, forums, messages
Re: Bulk Insert Questions

Posted by Erland Sommarskog on 12/29/06 23:35

Jennifer (J.Evans.1970@gmail.com) writes:
> I'm using Bulk Insert for the first time and have a question.
>
> I'm getting an error message about a field being truncated:
> Bulk insert data conversion error (truncation) for row 2, column 12
> (Depleted)
>
> The data type for the "Depleted" column is Char(1). Looking at the
> file, there is indeed only one character in the column. I'm not sure
> how to fix this, or what I can do about it. Any suggestions would be
> appreciated.

I was able to successfully insert the sample rows you posted.

I can think of two things:

1) There are trailing blanks.
2) The line terminator is not CR-LF, but only CR or only LF.

Since it was the second line that failed, the first seems more likely to me.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация