You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by ThiBar <th...@hotmail.com> on 2007/10/08 23:09:32 UTC
IBatis - Problem Date
What's the problem?!
<dynamic prepend="WHERE">
<isNotEqual prepend="AND" property="DataInicio" compareValue="1/1/0001
12:00:00 AM">
a.dat_inicio >= #DataInicio#
</isNotEqual>
<isNotEqual prepend="AND" property="DataFim" compareValue="1/1/0001 12:00:00
AM">
a.dat_fim <= #DataFim#
</isNotEqual>
The error ocurred in line Data_Fim {"This is an unexpected token. The
expected token is 'NAME'. Line 94, position 19." })
--
View this message in context: http://www.nabble.com/IBatis---Problem-Date-tf4590719.html#a13104985
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.
Re: IBatis - Problem Date
Posted by chook rib <ch...@gmail.com>.
because your sql has "<" and ">", use <![CDATA[]]>
<dynamic prepend="WHERE">
<isNotEqual prepend="AND" property="DataInicio" compareValue="1/1/0001
12:00:00 AM">
<![CDATA[a.dat_inicio >= #DataInicio#]]>
</isNotEqual>
<isNotEqual prepend="AND" property="DataFim" compareValue="1/1/0001 12:00:00
AM">
<![CDATA[a.dat_fim <= #DataFim#]]>
</isNotEqual>