Skip site navigation (1) Skip section navigation (2)

Re: null value in date field

From: Jeff Deroshia <jeff(at)hal(dot)physast(dot)uga(dot)edu>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: null value in date field
Date: 2003-02-19 20:45:15
Message-ID: 0CB1BF34-444B-11D7-A38A-000393A34A52@hal.physast.uga.edu (view raw or flat)
Thread:
Lists: pgsql-novice
Thanks to everyone who helped.  I was using prepared statements with 
java.sql.
I was using the setString() method to set the value to null, when I 
needed to be using the setNull() method.  It created the null values 
that I needed.

Jeff
On Tuesday, February 18, 2003, at 07:25 PM, Josh Berkus wrote:

> Jeff,
>
>> I have a form that contains optional DATE fields.  To enter null
>> values, I've tried null, 'null', '', '-', '0', 0, and each time I get
>> one of the following errors:
>
> NULL is correct, no quotes.   Please post the actual insert statement
> you are sending; likely the problem is elsewhere.
>
> -Josh


In response to

pgsql-novice by date

Next:From: Tom LaneDate: 2003-02-19 20:59:04
Subject: Re: Importing Postgres 7.1.1 DBs into Postgres 7.3.2
Previous:From: Guy FraserDate: 2003-02-19 19:06:56
Subject: Re: Passing arrays

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group