Skip to Content.
Sympa Menu

freetds - Re: [freetds] Having trouble doing a BULK INSERT

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Wes Gamble <weyus AT att.net>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Having trouble doing a BULK INSERT
  • Date: Tue, 07 Nov 2006 10:16:27 -0600

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




Archive powered by MHonArc 2.6.24.

Top of Page