PRB: BCP Out Does Not Allow Columns to Be Skipped

Last reviewed: April 28, 1997
Article ID: Q96812

The information in this article applies to:

  - Microsoft SQL Server version 4.2

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.