PRB: BCP Out Does Not Allow Columns to Be Skipped

ID: Q96812


The information in this article applies to:


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.

Additional query words: BCP.FMT Windows NT


Keywords          : kbtool SSrvBCP SSrvWinNT 
Version           : 4.2 | 4.2 | 4.2
Platform          : MS-DOS OS/2 WINDOWS 
Issue type        : 

Last Reviewed: March 16, 1999