25

Let's say in my sql statement I want to do:

WHERE numberOfCookies >= 10 

How do I do this in iBatis?

Stephane Grenier
  • 15,527
  • 38
  • 117
  • 192

2 Answers2

60

Because the SQL is written in xml, you cannot just use the symbol ">", you need to write it as:

WHERE numberOfCookies >= 10

Update:

> for greater than

< for less than

Green Lei
  • 3,150
  • 2
  • 20
  • 25
Stephane Grenier
  • 15,527
  • 38
  • 117
  • 192
8

Why does it not work?

The only thing I can think of is that the > character isn't playing nice with the XML. In which case, you can wrap the entire statement within <![CDATA[ ... ]]>

Tinister
  • 11,097
  • 6
  • 35
  • 36