Thread: Newbie: Copy from and dates

Newbie: Copy from and dates

From
pete@gui-innovations.com (Pete Vickers)
Date:
Hi,
I am trying to import a flat file into a database, where the dates may
or may not be present. Have tried specifying the column as null, or
default null, but if I try to import an empty date, it fails.
Is there a way round this please

TIA

Pete

Re: Newbie: Copy from and dates

From
Martijn van Oosterhout
Date:
On Sun, Mar 10, 2002 at 12:53:48PM -0800, Pete Vickers wrote:
> Hi,
> I am trying to import a flat file into a database, where the dates may
> or may not be present. Have tried specifying the column as null, or
> default null, but if I try to import an empty date, it fails.
> Is there a way round this please

If you're using COPY, then "\N" represents a null value. You can also
specify what is a null in the copy command itself IIRC.

--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> 11/9/2001 - a new beginning or the beginning of the end?