Bulk Insert - ROWTERMINATOR value

  • Hi

    My Bulk Insert fails because I'm attempting to load a file from Unix where the end-of-line character is composed of '0A' (LF) not '0D0A' (CRLF) as in Windows, and my ROWTERMINATOR = \n (which presumably expects '0D0A').

    Is it possible to specify value of ROWTERMINATOR to be an '0A' or LF character?

  • This was removed by the editor as SPAM

  • Hi-

    We just had a similar problem and found a good solution here:

    http://www.winnetmag.com/SQLServer/Forums/messageview.cfm?catid=1672&threadid=100229

    You might have to be a subscriber to make that link work but basically it says that the \n is composed of \r\l (little r little ell).

    So try the \l and let us know.

    Richard

  • I experimented with various suggested options and the one which worked was by specifying ROWTERMINATOR='char(10)'.

    CHAR(10) equates to the Line Feed character. Only the t, n, r, \, and 0 characters work with the backslash escape character to produce a control character. So I'm afraid \l (little ell) doesn't work.

    The the URL in your reply was very useful.

    Many thanks.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply