PRB: BCP Out Does Not Allow Columns to Be Skipped (96812)



The information in this article applies to:

  • Microsoft SQL Server 4.2x

This article was previously published under Q96812

SYMPTOMS

A column will be copied "out" of SQL Server when using the Bulk Copy Program (BCP) even if the format (.FMT) file has specified a length of zero for that particular column.

Also, BCP will not truncate a column when copying the data out of SQL Server, even if the length specified in the .FMT file is a lesser value than the true length of the column.

CAUSE

The behavior of the BCP utility version 4.2 has changed from version 1.1x in that it will not allow columns to be eliminated or truncated by giving a length less than that of the column when bulk copying the data out of SQL Server.

WORKAROUND

If it is necessary to bulk copy data out of SQL Server, and a column needs to be removed or truncated, you will need to make use of an intermediate table. By using the SELECT INTO clause in SQL Server, columns can be modified or dropped and then BCP can be used to unload the data.

Modification Type:MajorLast Reviewed:3/19/1999
Keywords:KB96812