Skip to content Skip to sidebar Skip to footer

In Sql Server Bulk Insert, How Do I Use Higher Ascii Characters For Field And Row Terminators

I have a bulk insert that works on SQL Server 2000 that I'm trying to run on SQL Server 2008 R2, but it's not working as I had hoped. I've been successfully running these bulk ins

Solution 1:

Specifying DATAFILETYPE='widechar' inside your WITH block should remove your need to use the format file by being able to specify the "widechar" field and row terminators in the WITH of the BULK INSERT as well. I referenced this MSDN article on unicode character format for importing data.

BULK INSERT Database1.dbo.Table1
FROM 'C:\DataFile.dat'
WITH ( TABLOCK
   , CHECK_CONSTRAINTS
   , MAXERRORS = 0
   , DATAFILETYPE = 'widechar'
   , FIELDTERMINATOR = 'ù'
   , ROWTERMINATOR = 'ú'
)

Post a Comment for "In Sql Server Bulk Insert, How Do I Use Higher Ascii Characters For Field And Row Terminators"