pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Treat <xzilla@users.sourceforge.net>
To: Sidar Lopez Cruz <sidarlopez@hotmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Dump from mssql
Date: 27 Feb 2003 10:21:58 -0500
Message-ID: <1046359318.1015.582.camel@camel> (raw)
In-Reply-To: <OE65eQ6ThLjmSFXLNms0000968c@hotmail.com>
References: <OE65eQ6ThLjmSFXLNms0000968c@hotmail.com>

If none of your data contains commas, you can load it in with copy,
changing delimiters to , and then update the fields to strip out the "
once the data is loaded. 

If your data does contain commas (,) you'll need to do some awk/sed/perl
magic to better delimit your file (perhaps a @@@ between each field?)
Actually the DTS program might allow you to do this as well.

Robert Treat

On Wed, 2003-02-26 at 13:46, Sidar Lopez Cruz wrote:
> how can i dump plaint text files from mssql to postgresql 7.3
> the file format is...
>  
> "555555555","some people name",3
> ....
>  
> the table in mssql is
>  
> create table people (id varchar(20),name varchar(200),id_document
> bigint)
> and the same in postgresql
>  
> remember that the file was generated by mssql with data transformation
> program (DTS)
>  
> S.O.S. i need to do this... for begin in postgresql?
> 
> :-) Sidar Lopez Cruz
> - Cero Riesgo, S.A.






view thread (2+ messages)

Message-ID: <1046359318.1015.582.camel@camel>
Permalink:  ../1046359318.1015.582.camel@camel/
Also on:    postgresql.org/message-id/1046359318.1015.582.camel@camel

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: xzilla@users.sourceforge.net, sidarlopez@hotmail.com
  Subject: Re: Dump from mssql
  In-Reply-To: <1046359318.1015.582.camel@camel>
  References: <OE65eQ6ThLjmSFXLNms0000968c@hotmail.com> <1046359318.1015.582.camel@camel>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox