Re: COPY from on date field problem

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Patrick Hatcher <PHatcher(at)macys(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: COPY from on date field problem
Date: 2002-02-26 23:58:49
Message-ID: 1014767929.5761.339.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, 2002-02-26 at 22:59, Patrick Hatcher wrote:
>
> Never mind found the answer. I forgot to do the WITH NULL as '' at the end
> of my COPY statement.

That solves this particular problem for you. However, it would cause
you problems if you also had text fields with empty strings (as opposed
to NULLs). The standard representation of null in COPY input is \N

112116 73440 2/9/2002 2/9/2007 49 2 0 .01
112117 73017 1/7/2002 12/7/2006 189 2 0 65.99
112118 73450 \N \N 0 0 0 0
112119 73016 1/7/2002 12/6/2006 69 2 0 23.99

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

"But God commendeth his love toward us, in that, while
we were yet sinners, Christ died for us."
Romans 5:8

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2002-02-27 00:34:01 Re: Major newbie - Part deux
Previous Message Jochen Kaechelin 2002-02-26 23:13:02 Hello List