ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Rogov" <andrey.ro...@gmail.com>
Subject Re: Passing date as string to IBATIS.
Date Sun, 09 Mar 2008 16:57:11 GMT
and here I pass String

select count(*) as count
  from projects.documents d
where to_char( d.created, 'dd Mon yy' ) = to_char(#created#)  or

select count(*) as count
  from projects.documents d
where to_char( d.created, 'dd Mon yy' ) = #created#

DEBUG [http-8080-Processor24] java.sql.Connection debug- {conn-100003}
Connection
DEBUG [http-8080-Processor24] java.sql.PreparedStatement debug-
{pstm-100004} PreparedStatement:                select count(*) as
count             from projects.documents d            where to_char(
d.created, 'dd Mon yy' ) =
to_char(?)

DEBUG [http-8080-Processor24] java.sql.PreparedStatement debug-
{pstm-100004} Parameters: [28 Фев 08]
DEBUG [http-8080-Processor24] java.sql.PreparedStatement debug-
{pstm-100004} Types: [java.lang.String]
DEBUG [http-8080-Processor24] java.sql.ResultSet debug- {rset-100005}
ResultSet
DEBUG [http-8080-Processor24] java.sql.ResultSet debug- {rset-100005}
Header: [COUNT]
DEBUG [http-8080-Processor24] java.sql.ResultSet debug- {rset-100005}
Result: [2]

iBatis works great .
Mime
View raw message