Microsoft KB Archive/265355

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

Article ID: 265355

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



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.

Additional query words: nchar nvarchar padding diff differences suffix suffixes datatype datatypes

Keywords: kbbug kbfix kbqfe KB265355

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.