You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Christina Xu <ch...@yahoo.com> on 2006/02/15 02:02:26 UTC

Please help. New to iBatis -- iTatis doesn't like ">=" and "<=" sign

Hello,

I am new to iBatis. The query is simple but looks like
that iBatis doesn't like ">=" and "<=". Any ideas
about how to solve this problem. Am I doing anything
wrong? Very appreciate your help.

The query is:

<select id="doSelectUser"
parameterClass="java.util.Map resultClass="myClass">

select * from tableName where id >= #lower# and id <=
#higher#
</select>

Christina



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Please help. New to iBatis -- iTatis doesn't like ">=" and "<=" sign

Posted by Neverov Dm <ne...@nkmk.ru>.
Hi, Christina.

<select id="doSelectUser" parameterClass="java.util.Map resultClass="myClass">
<![CDATA[
         select * from tableName where id >= #lower# and id <=
         #higher#
]]>
</select>

---------------------------------
You wrote 15 ôåâðàëÿ 2006 ã., 8:02:26:

> Hello,

> I am new to iBatis. The query is simple but looks like
> that iBatis doesn't like ">=" and "<=". Any ideas
> about how to solve this problem. Am I doing anything
> wrong? Very appreciate your help.

> The query is:

> <select id="doSelectUser"
> parameterClass="java.util.Map resultClass="myClass">

> select * from tableName where id >= #lower# and id <=
> #higher#
> </select>

> Christina



> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 



---------------------------------
-- 
Neverov                          mailto:neverov_dg@nkmk.ru





Re: Please help. New to iBatis -- iTatis doesn't like ">=" and "<=" sign

Posted by Clinton Begin <cl...@gmail.com>.
Ahh the joys of XML.. :-)

Use a CDATA block as follows....be careful with CDATA blocks when you're
using iBATIS dynamic SQL tags, sometimes it's easier to just use &lt; and
&gt;  Luckily for most people this is a rare problem.

<select id="doSelectUser"
parameterClass="java.util.Map resultClass="myClass">
<![CDATA[
select * from tableName where id >= #lower# and id <=
#higher#
]]>
</select>

Cheers,
Clinton

On 2/14/06, Christina Xu <ch...@yahoo.com> wrote:
>
> Hello,
>
> I am new to iBatis. The query is simple but looks like
> that iBatis doesn't like ">=" and "<=". Any ideas
> about how to solve this problem. Am I doing anything
> wrong? Very appreciate your help.
>
> The query is:
>
> <select id="doSelectUser"
> parameterClass="java.util.Map resultClass="myClass">
>
> select * from tableName where id >= #lower# and id <=
> #higher#
> </select>
>
> Christina
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>