ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barnett, Brian W." <bbarn...@scholarinc.com>
Subject RE: why delete by date not working?
Date Thu, 13 Jan 2005 22:23:06 GMT
For starters, it looks like you have "where" twice.

-----Original Message-----
From: Philip Chan [mailto:pchan@locussystems.com] 
Sent: Thursday, January 13, 2005 2:59 PM
To: ibatis-user-java@incubator.apache.org
Subject: why delete by date not working?

Hi

I have this delete statement

java.util.Date now = new Date();
SqlMapClient client = null;
Reader reader = Resources.getResourceAsReader("SqlMapConfig.xml");
client = SqlMapClientBuilder.buildSqlMapClient(reader);

client.delete("ActivityLog.PurgeDate", now);

Inside sqlmap.xml
	<delete id="ActivityLog.PurgeDate" parameterClass="date">
	<![CDATA[
	delete from activitylog al where where al.exectime <= #exectime#
	]]>
	</delete>

The record never got deleted.

I am using ibatis 2.0.x and oracle 9.

Mime
View raw message