ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Poitras Christian" <Christian.Poit...@ircm.qc.ca>
Subject RE: <iterate> used to work, now fails
Date Thu, 29 Jun 2006 16:13:46 GMT
Is it working now?
 
>From what I see, the second method should also work. Unless you use an
database that doesn't consider || as being a concatenation.
You could also patch your sql (I personnaly dislike this a bit) by doing
this : LIKE '%$value[]$%'. I guess it will wok if value is always a
String.
 
Christian

________________________________

From: Robert Campbell [mailto:rrc7cz@gmail.com] 
Sent: Thursday, 29 June 2006 09:13
To: user-java@ibatis.apache.org
Subject: Re: <iterate> used to work, now fails


 I figured out what it was. I changed 

UPPER(sponsor_name) LIKE #value[]# 

to 

UPPER(sponsor_name) LIKE '%'||#value[]#||'%'

And took out the Java code that manually added the "'%'..etc

This is better form anything. What's weird, however, is that the first
method worked just fine before.. who knows, I'm just glad it's fixed.


Mime
View raw message