Re: Importing directly from BCP files

From: S McGraw <smcg4191(at)mtneva(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Cc: Tim Uckun <timuckun(at)gmail(dot)com>, timuckun(at)gmail(dot)com
Subject: Re: Importing directly from BCP files
Date: 2015-11-16 17:25:28
Message-ID: 564A1188.9060503@mtneva.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2015-11-16 19:13:04 Re: Importing directly from BCP files
Previous Message Tom Lane 2015-11-16 17:19:30 Re: update inside function does not use the index