I'm running SQL Server 2005 Express. And I'm trying to do a bulk insert/import of a data file with a field/row terminator that uses a hexadecimal value 0x001. How should I represent it in a bulk insert command?
I have something like:
bulk insert xxx.dbo.[yyy]
from 'D:\zzz\zzz.dat'
with (
CODEPAGE='RAW',
FIELDTERMINATOR = '=|=',
ROWTERMINATOR = '=|=\001\n',
KEEPNULLS
);
which results in
Msg 4863, Level 16, State 1, Line 7
Bulk load data conversion error (truncation) for row 1, column 3 (code).
Column 3 is the last column. And removing the hex value from the string lets it load properly in SQL Server, however, I want to know if it's possible to represent/use a hex value in a terminator.