ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yusuf" <Yu...@ekalife.co.id>
Subject RE: implicit date issue
Date Mon, 22 Jan 2007 02:36:22 GMT
Hi, for what it's worth,
i looked into my xml and found this

	<select id="com.xxx.selectNextBill"
parameterClass="java.util.Date" resultClass="java.util.Date">
		 select
		 case when to_char(#value#,'dd') <![CDATA[<]]>
to_char(add_months(#value#,1),'dd')
		 then to_date(to_char(#value#,'dd') || '/' ||
to_char(add_months(#value#,1),'mm/yyyy'),'dd/mm/yyyy')
		 else add_months(#value#,1) end
		 from dual
	</select>

its running without problem, i'm using iBATIS 2.1.7.597, ojdbc14.jar,
and oracle 8i...


-----Original Message-----
From: Nathan Maves [mailto:nathan.maves@gmail.com]
Sent: Monday, January 22, 2007 7:21 AM
To: user-java@ibatis.apache.org
Subject: implicit date issue


The following query does not work with Oracle 9i.

<select id="queryForCaseIds" resultClass="string"
parameterClass="java.util.Date">
    select distinct case_id from (
        select case_id from case_history where last_update_date >=
#value# 
          union
        select case_id from task_history where last_update_date >=
#value#
    )
  </select>

If I modify it to be #value:Date# as is well.  The column is a DATE in
Oracle and a java.util.Date in the parameter.  Why can ibatis not figure
out that this is a DATE?

Nathan


Mime
View raw message