From: | Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com> |
---|---|
To: | dhoubrechts <dhoubrechts(at)cybernet(dot)be>, pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: valide date in an ascii file |
Date: | 2002-02-01 21:11:18 |
Message-ID: | 20020201211118.60514.qmail@web20805.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)cybernet(dot)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(at)postgresql(dot)org
__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | jtv | 2002-02-02 10:57:26 | Re: having a whole lot of trouble... |
Previous Message | Tom Lane | 2002-02-01 20:40:57 | Re: timestamp Format on Binary Cursor |