(iBATIS)아이바티스 IN절 사용법 (iterate 사용)
[Server side 코드]
var idList = new List();
idList.Add(10);
idList.Add(12);
[아이바티스 내 사용법]
< select id=”GetLogin” parameterClass=”cusstomParam” resultClass=”int” >
SELECT DISTINCT StudentName
FROM STUDENT
WHERE Year = #Year#
< isNotEmpty property=”AgencyYn” prepend=””>
< isEqual property=”AgencyYn” prepend=”AND” compareValue=”Y”>
< iterate prepend=”” property=”IDList” open=”AgencyID IN (” close=”)” conjunction=”,”>
#IDList[]#
< /iterate>
< /isEqual>
< /isNotEmpty>
< /select>