Re: Importing directly from BCP files - Mailing list pgsql-general

From S McGraw
Subject Re: Importing directly from BCP files
Date
Msg-id 564A1188.9060503@mtneva.com
Whole thread Raw
In response to Re: Importing directly from BCP files  (Tim Uckun <timuckun@gmail.com>)
Responses Re: Importing directly from BCP files
List pgsql-general
On 11/15/2015 11:52 PM, Tim Uckun wrote:
> >  I moved a database from MS Sql Server 2000 to Postgresql a few years
> >  ago via BCP files.  I used a Python script to do some fixup on the
> >  BCP files to make them importable as CSV files into Postgresql.  I
> >  don't know if quirks I ran into are still an issue with newer versions
> >  of Sql Server but for what it's worth, here are the comments from that
> >  script:
>
> Do you rember what the encoding of the files was by any chance?

I don't but the machine they were exported from would have been using
either the regular English/US locale or CP-932 (Japanese).

Looking at the extract script, it seems the bcp command used to extract
them used -c option, eg:

  bcp sw.dbo.swkwt out data\swkwt.tmp -c -U sa -P ****** -S NARA\SQLEXPRESS




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: update inside function does not use the index
Next
From: Mohammed Ajil
Date:
Subject: Adding a new module to postgres