Determine ROW that caused “unexpected end of file” error in BULK INSERT?

后端 未结 11 1986
闹比i
闹比i 2020-12-16 10:18

i am doing a bulk insert:

DECLARE @row_terminator CHAR;
SET @row_terminator = CHAR(10); -- or char(10)

DECLARE @stmt NVARCHAR(2000);
SET @stmt = \'
  BULK I         


        
11条回答
  •  感动是毒
    2020-12-16 10:30

    If CHAR(10) is the row terminator, I don't think you can put it in quotes like you are trying to in BULK INSERT. There is an undocumented way to indicate it, though:

    ROWTERMINATOR = '0x0A'
    

提交回复
热议问题