beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Inserting Null Dates
Date Tue, 17 Jul 2007 15:40:04 GMT

I am having the following problem:
I want to insert a NULL for a row in a PostgreSQL 8.2 DATE field.

I am trying the follwoing SQL JDBC Control function:
	@SQL(statement="insert into test(id,date) values ({id},{date})")
	public void insertIntoTest(int id, java.sql.Date date);
I cannot do that with date=null.

I also tried with {d{date}} and then tried to use a second parameter of String
with null, and "" values, both with {date} and {d {date}} substitutions - 
I get different error messages.

How can I insert a null date value with the usual substitutional syntax?

This will be necessary when I get a table with a default non null value for a
DATE column and I will need to purposefully set the value to null.

Kind regards:

View raw message