hex value in field/row terminator for bulk insert
- by TheObserver
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).