ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koka Kiknadze" <226...@gmail.com>
Subject Re: SQL Map Problem - iterating through a list, using a like query
Date Tue, 06 Mar 2007 22:17:39 GMT
On 3/7/07, Jeff Butler <jeffgbutler@gmail.com> wrote:
>
> I don't believe the iterator works with string substitution, so you'll
> need to use parameters instead
>

Well, seems in fact it does - I have the following working:
        <dynamic>
            <iterate property="serviceDetails" conjunction="OR">
                <isNotNull prepend="and"
property="serviceDetails[].criteria">
(main_detail_type_id = $serviceDetails[].detailTypeID$ AND main_detail like
'%$serviceDetails[].criteria$%')
                </isNotNull>
            </iterate>
        </dynamic>


I believe that the problem is in applying UPPER to '%$accountList[]$%', I'd
try:

like '' || '%' || Upper('$accountList[]$') || '%' || ''

Mime
View raw message