select * from mytable where myfield=null;

From: blamouret <bruno(dot)lamouret(at)westcast-systems(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: select * from mytable where myfield=null;
Date: 2002-05-11 21:19:20
Message-ID: 3CDD8AD8.8010601@westcast-systems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,
I'm using Postgresql 7.2.1, with JBoss2.4.4. and jdk1.4

Here is my table :
id | date | value
-----+-------------------------+---------
1 | 2002-05-10 10:00:00:+02 | 5
2 | (null) | 10
...

With the jdbc driver, this query doesn't any result :
Stmt = con.prepareStatement(select * from mytable where date=?)
Stmt.setNull(1,java.sql.Types.TIMESTAMP);
Stmt.executeQuery();

I think the jdbc driver transform the query on "select * from mytable
where date=null" and not "select * from mytable where date is null".

Il seems that select * from mytable where date=null was supported by
postgres before 7.0 version, but not with the 7.2.1

How can i do ?
thanks
Bruno.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message tony 2002-05-12 12:34:15 dreamweaver mx
Previous Message Barry Lind 2002-05-10 21:32:12 Re: NullPointerException in rg.postgresql.jdbc2.ResultSet.getBytes