• Sorry for the nonsense post, and thanks a lot for the question. It came very timely with a text I'm writing, and made me aware of problem with BCP that I had missed.

    The problem is the BOM, byte-order-mark. A unicode file typically start with a BOM, so that an application can see if the encoding is UTF-16LE (the normal on Windows), UTF16BE or UTF-8. Without it, the program needs to try heuristics.

    BULK INSERT and OPENROWSET understand the BOM, and can read both UTF-16LE and UTF-16BE. They also understand to skip the BOM and not import it.

    BCP on the other hand, does not understand the BOM, but thinks that those two bytes are just data. If the first field is a character field, the BOM will be imported as part of the data. Here, where the first field is a number, everything goes bad. BCP can only handle UTF-16LE files without BOM.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]