BUG: BCP IN of INT With Trailing Spaces May Fail

ID: Q137430


The information in this article applies to:

BUG# NT: 11017 (6.0)

SYMPTOMS

In Microsoft SQL Server version 6.0, character mode BCP into an INT column where the source data has trailing spaces may fail with the error:

Attempt to convert data stopped by syntax error in source field.


WORKAROUND

Eliminate the trailing spaces from the source data, or use a 4.2x version of BCP and DB-Library.


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


MORE INFORMATION

An example of the problem would be a table with two columns INT and CHAR(5). BCPing a CSV file of the format:

1,test

works fine. However,
1 ,test

fails because of the space trailing the "1".

Additional query words: sql6 windows nt syntax character


Keywords          : kbprg SSrvBCP kbbug6.00 
Version           : 6.0
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: April 16, 1999