|
Posted by Erland Sommarskog on 07/27/06 07:42
Davy B (david.bridge@itv.com) writes:
> The data file is a tab-delimited file created from an Excel "save as".
> If I had been importing a unicode file I am sure the Name column would
> have been messed up, but that's the only column that imported
> correctly. I tried changing the SQLCHAR to SQLNCHAR, but that breaks.
> I tried changing the "\t" delimiter to "\t\0" and that breaks too. I
> also tried changing the sizes of cols 1 and 3 to 0 as you suggest, but
> get exactly the same result.
SQLNCHAR is what you should use if you had a Unicode file. Since you
did not specify that part, I had to cover it in case.
> So why does BCP create format files that have the database column
> type???
Because it guessed that you wanted to create a native file? Did you tell it
that you had a text file?
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|