ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Celaya, Tina \(GE Indust, ConsInd\)" <tina.cel...@ge.com>
Subject problems with dynamic sql
Date Thu, 27 Jul 2006 17:49:00 GMT
I want to put somthing like this in de query moths in (1,2,3,4,5,6) and I tried using month
in ($list$) and list have integers 1,2,3,4,5,6 but it doesnt work, i have an error that says
invalid colum '1,2,3,4,5,6' and i dont know how to solve this so i can have this query
select * from table where months in (1,2,3,4,5) and year=year 
i have this but is not working

 <select id="nameID" parameterClass="java.util.Map" resultClass="someClass">
 select * from table where months in ($months$) and year=#year#

and i sent a parameter hashmap than has hashmap.add("year",year) and hashmap.add("months",monthsList)
and moths is a List with integers
thanks for your help  

Tina Celaya
GE Consumer & Industrial
Systems Analyst

View raw message