Empty date field !

Started by Erik Colsonalmost 27 years ago4 messagesgeneral
Jump to latest
#1Erik Colson
beaver@glo.be

Hello !

I'm desperately searching how to UPDATE a date-field with an empty value ?

I really just want to clear a date field !

Please help
thanks !

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Erik Colson (#1)
Re: [GENERAL] Empty date field !

On Tue, 6 Jul 1999, Erik Colson wrote:

Hello !

I'm desperately searching how to UPDATE a date-field with an empty value ?

I really just want to clear a date field !

UPDATE table SET field_of_type_date = NULL [ WHERE condition ];

--
Peter Eisentraut
PathWay Computing, Inc.

#3Christian Rudow
Christian.Rudow@thinx.ch
In reply to: Erik Colson (#1)
Re: [GENERAL] Empty date field !

I'm desperately searching how to UPDATE a date-field with an empty
value ?

use escape : \N (represents NULL)
Chris

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Christian Rudow E-Mail: Christian.Rudow@thinx.ch
ThinX networked business services Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#4Greg Youngblood
YoungblG@houstoncellular.com
In reply to: Christian Rudow (#3)
RE: [GENERAL] Empty date field !

UPDATE tablename SET datefieldname=NULL WHERE conditions=here;
�
I have had to code around this for some web applications I wrote. You can
assign datetime fields a NULL value, but you can't assign it an empty value
(''). Though, I didn't try "" instead of ''.
�
Greg
�

Gregory S. Youngblood
ext 2164
�
�

�

-----Original Message-----
From: Erik Colson [mailto:beaver@glo.be]
Sent: Tuesday, July 06, 1999 3:36 PM
To: Postgres-General
Subject: [GENERAL] Empty date field !

Hello !
�
I'm desperately searching how to UPDATE a date-field with an empty value ?
�
I really just want to clear a date field !
�
Please help
thanks !