ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Jardin <jeremy.jar...@gmail.com>
Subject date in where clause does not work.
Date Tue, 04 May 2010 15:11:56 GMT

Hi, 

I'm simply trying to build a request with Date comparaisons.. and ibatis
still reply me empty list..

My generated request in logs :
DEBUG - [] - [main] (JakartaCommonsLoggingImpl.java:27) - {conn-100000}
Connection
DEBUG - [] - [main] (JakartaCommonsLoggingImpl.java:27) - {conn-100000}
Preparing Statement:           select *  from TAB_CHIF where (DAT_CHIF
>?)order by DAT_CHIF               
DEBUG - [] - [main] (JakartaCommonsLoggingImpl.java:27) - {pstm-100001}
Executing Statement:           select *  from TAB_CHIF where (DAT_CHIF
>?)order by DAT_CHIF               
DEBUG - [] - [main] (JakartaCommonsLoggingImpl.java:27) - {pstm-100001}
Parameters: [2010-05-04]
DEBUG - [] - [main] (JakartaCommonsLoggingImpl.java:27) - {pstm-100001}
Types: [java.sql.Date]

If I launch handly the same request (with a date parsing) in my oracle
client, there's one row.
select * from TAB_CHIF where(DAT_CHIF > to_date('2010-05-04',
'yyyy-MM-dd'));


I guess I've got a dateFormat matter.. but what's the workaround ?

Thanks.
Jeremy
-- 
View this message in context: http://old.nabble.com/date-in-where-clause-does-not-work.-tp28447759p28447759.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message