[freetds] Having trouble doing a BULK INSERT
Wes Gamble
weyus at att.net
Tue Nov 7 11:16:27 EST 2006
All,
Lowden, James K wrote:
> Konrad's idea is on target because you're having trouble with the last
>
>field in the first row.
>
>I'd be interested in this output:
>
>$ head -1 datafile | hexdump -c
>
>Your linux box surely includes something like dos2unix and unix2dos to
>convert one to the other. A Windows line terminator is (hex) 0D 0A. If
>you really did what you said, you wound up with 0A 0D, which won't do at
>all.
>
>You can also use the ROWTERMINATOR option, but good luck figuring out
>from the documentation how to specify a one-byte 0x0A newline
>terminator.
>
>
This, in fact, was the problem. A quick "od -xc" on my file showed that
I had written it in UNIX format but it needed to be in Win format.
Sigh. I know better than that.
Thanks for all of the help.
Wes
More information about the FreeTDS
mailing list