From: | Stephen Ingram <ingram(at)samsix(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | NULLs on datetime problem (for me at least :) ) |
Date: | 2002-01-17 16:09:49 |
Message-ID: | 20020117161710.XUDQ10932.femail35.sdc1.sfba.home.com@there |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi there,
I am having problems loading data into a datetime field when
the table allows NULL for the date.
I assume I am doing something silly. Can anyone help me?
Preferably technical rather than medical :)
Cheers
steve
# here is my test table.
--
-- Test table.
--
CREATE TABLE MyTable
(
myName varchar(50) NOT NULL,
myDate datetime NULL
);
# here is my datafile, with empty date data
si> cat datafile
fred|
bob|
harry|
# here is the table is Postgres
mydb=# \d mytable
Table "mytable"
Attribute | Type | Modifier
-----------+--------------------------+----------
myname | character varying(50) | not null
mydate | timestamp with time zone |
# here is the copy line I was trying.
mydb=# COPY mytable FROM '/home/si/datafile' USING DELIMITERS '|';
ERROR: copy: line 1, Bad timestamp external representation ''
From | Date | Subject | |
---|---|---|---|
Next Message | Jason Earl | 2002-01-17 18:19:31 | Re: Sending Email |
Previous Message | Rob | 2002-01-17 15:24:52 | Store proc |