Skip to Content.
Sympa Menu

freetds - Re: How freebcp import or expot CSV files or files with fields terminator

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: James K. Lowden <jklowden AT speakeasy.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: How freebcp import or expot CSV files or files with fields terminator
  • Date: Thu, 17 Oct 2002 23:32:50 -0400


On Thu, 17 Oct 2002 22:25:01 -0400, "Terry Cheung"
<terry_cheung AT hk.ml.com> wrote:
> I have tried to use the freebcp utilty to import a CSV file into a MSSQL
> 2000 database with -t"," options. However, I only got 0 rows copied. I
> have tried a normal text file with tab as terminator which works but we
> do have a need to use CSV files.

Hi Terry,

Welcome to the project.

> What should I do?

Patch the code? ;-)

freebcp won't write (or read) CSV files. It replaces the vendors' "bcp"
utilities, which didn't deal with them either.

You could whip up a little perl script, or download one from the CPAN,
that converts freebcp a datafile to/from CSV. I'd say that would be the
easiest route.

It's a good idea for freebcp, though. Maybe one day.

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page