Re: Using a like statement

2005-05-31 Thread Brian Bruns
FAQ misses my favorite approach which is: select * from table1 where column like #parm# || '%' It gives all the advantages of using #parm# over $parm$ and you don't need special processing in the java code to add the '%' . The downside is that || is not universal for string concatenation, so por

Re: Using a like statement

2005-05-31 Thread Albert L. Sapp
Build your value before sending it to the select statement in your xml file. I set my values in my action by using this: itemQuery.setDescription('%' + request.getParameter("description").toUpperCase() + '%') I, then, pass the parameter itemQuery to my manager and DAO layers. Hope this helps.

Re: Using a like statement

2005-05-31 Thread Larry Meadors
It is in the FAQ: http://opensource.atlassian.com/confluence/oss/display/IBATIS Larry On 5/31/05, Steven Pannell <[EMAIL PROTECTED]> wrote: > Hi, > > Is there an easy way to describe a 'like' statement in the iBatis xml file. > for example I have: > > > select * from bush where bush_n

Using a like statement

2005-05-31 Thread Steven Pannell
Hi, Is there an easy way to describe a 'like' statement in the iBatis xml file. for example I have: select * from bush where bush_name like #value# Using Oracle I have to make the value look like this: String value = "hello%" Can't I do this in the map something like: