Java Mailing List Archive

http://www.java2.5341.com/

Home » user-java.ibatis »

date in where clause does not work.

Jeremy Jardin

2010-05-04

Replies: Find Java Web Hosting

Author LoginPost Reply

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
--
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@(protected)
For additional commands, e-mail: user-java-help@(protected)

©2008 java2.5341.com - Jax Systems, LLC, U.S.A.