Re: valide date in an ascii file - Mailing list pgsql-interfaces

From Jeff Eckermann
Subject Re: valide date in an ascii file
Date
Msg-id 20020201211118.60514.qmail@web20805.mail.yahoo.com
Whole thread Raw
In response to valide date in an ascii file  (dhoubrechts <dhoubrechts@cybernet.be>)
List pgsql-interfaces
Add "with null as ''" to your COPY statement.  

Alternatively, edit the file to replace those empty
strings with some other NULL representation (COPY
expects "\N" by default; otherwise the syntax above is
required), or else insert dummy dates into your file.
--- dhoubrechts <dhoubrechts@cybernet.be> wrote:
> I'm trying to copy data from an ascii file to a
> postgres table using :
> copy table using 'Home/tetrao/tetrao.txt' using
> delimiters ';';
> My question is : How do i enter valide dates form
> that file when the
> column is empty (;;)? Postgres want some valide date
> and don't want ''
> 
> Please help !
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo@postgresql.org


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com


pgsql-interfaces by date:

Previous
From: dhoubrechts
Date:
Subject: valide date in an ascii file
Next
From: jtv
Date:
Subject: Re: having a whole lot of trouble...