pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Webb Sprague <wsprague100@yahoo.com>
To: Ed <ed@jetumele.com>
To: pgsql sql <pgsql-sql@postgresql.org>
Subject: Re: \copy...
Date: Tue, 20 Jun 2000 09:56:36 -0700 (PDT)
Message-ID: <20000620165636.11913.qmail@web805.mail.yahoo.com> (raw)

Finally--a question I think I can answer!

You need to specify what delimiters you use in your
.dat file;  the default for COPY is tab, but you can
change that to | with

   copy tablename from '/home/ed/import.dat' 
       delimiters '|'

Hope this works...(oops--I mean 'helps')

--- Ed <ed@jetumele.com> wrote:
> Hi,
> 
> I have a file that look like this :
> 
> firstname|lastname|email@domain.com
> firstname2|lastname2|email2@domain.com
> 
> and a table foo like :
> 
> firstname  varchar(30),
> lastname   varchar(30),
> email    varchar(50)
> 
> and I would like to do a :
> 
> copy tablename from '/home/ed/import.dat';
> 
> But then, everything goes in the first field... what
> does i'm doing
> wrong?!?!
> 
> Frédéric Boucher
> Ed@jetumele.com
> Programmation, Support technique
> Jetumele Communications inc.
> 
> 


__________________________________________________
Do You Yahoo!?
Send instant messages with Yahoo! Messenger.
http://im.yahoo.com/



view thread (8+ messages)  latest in thread

Message-ID: <20000620165636.11913.qmail@web805.mail.yahoo.com>
Permalink:  ../20000620165636.11913.qmail@web805.mail.yahoo.com/
Also on:    postgresql.org/message-id/20000620165636.11913.qmail@web805.mail.yahoo.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: wsprague100@yahoo.com, ed@jetumele.com
  Subject: Re: \copy...
  In-Reply-To: <20000620165636.11913.qmail@web805.mail.yahoo.com>

* 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