Simon's SQL

SQL,DBA,tuning,Trouble Shooting,Performance

Archive for March 7th, 2013

Bulk load data conversion error (overflow) SQLINT (BCP)

Posted by Simon Cho on 03/07/2013

http://msdn.microsoft.com/en-us/library/ms189110%28v=sql.90%29.aspx

Only SQLCHAR is allowed for fmt files if the file storage type is Char.

 

 

1 Data files that are stored in character format use char as the file storage type. Therefore, for character data files, SQLCHAR is the only data type that appears in a format file.

2 You cannot bulk import data into text, ntext, and image columns that have DEFAULT values.

When you bulk export data from an instance of SQL Server to a data file:

  • You can always specify char as the file storage type.
  • If you enter a file storage type that represents an invalid implicit conversion, bcp fails; for example, though you can specify int for smallint data, if you specify smallint for int data, overflow errors result.
  • When noncharacter data types such as float, money, datetime, or int are stored as their database types, the data is written to the data file in the SQL Server native format.

Posted in Common | Tagged: , , | 1 Comment »