FIX: NCHAR Columns Padded with Empty Strings Instead of Spaces During BCP/BULK INSERT (265355)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q265355
BUG #: 57827 (SQLBUG_70)

SYMPTOMS

Unicode character type nchar columns are padded with empty strings (ASCII value: 0) instead of space characters (ASCII value: 32) during bulk copy program (bcp) or BULK INSERT operations. With ANSI PADDING OFF, only columns that are created as char and later ALTERed to nchar exhibit this behavior. This problem does not occur if the data is inserted by using the INSERT statement or by using INSERT..SELECT or SELECT..INTO operations.

CAUSE

BULK INSERT and bcp operations behave differently when the column is created as nchar, as opposed to when it is created as char and later altered to nchar, based on the ANSI PADDING setting. This option should not affect the padding behavior on Unicode fixed length character data types.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0

For more information, contact your primary support provider.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbfix kbQFE KB265355