pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Dump from mssql
2+ messages / 2 participants
[nested] [flat]

* Dump from mssql
@ 2003-02-26 18:46 Sidar Lopez Cruz <sidarlopez@hotmail.com>
  2003-02-27 15:21 ` Re: Dump from mssql Robert Treat <xzilla@users.sourceforge.net>
  0 siblings, 1 reply; 2+ messages in thread

From: Sidar Lopez Cruz @ 2003-02-26 18:46 UTC (permalink / raw)
  To: pgsql-admin

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.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Dump from mssql
  2003-02-26 18:46 Dump from mssql Sidar Lopez Cruz <sidarlopez@hotmail.com>
@ 2003-02-27 15:21 ` Robert Treat <xzilla@users.sourceforge.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Treat @ 2003-02-27 15:21 UTC (permalink / raw)
  To: Sidar Lopez Cruz <sidarlopez@hotmail.com>; +Cc: pgsql-admin

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.






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-02-27 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-26 18:46 Dump from mssql Sidar Lopez Cruz <sidarlopez@hotmail.com>
2003-02-27 15:21 ` Robert Treat <xzilla@users.sourceforge.net>

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