I tried this :
@Select("SELECT * FROM TABLENAME WHERE PRDCR_ID IN "
+ "FOREACH item= 'item' index= 'index' collection= 'childScanIDs' separator=',' open='(' close=')'> #{item} </FOREACH>")
abstract List<String> getCompanydetails(@Param("childScanIDs") List<String> childScanIDs, @Param("groupName") String groupName);
And I got the error below:
Could not set parameters for mapping:
ParameterMapping{property='childScanIDs', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}.
Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null .
Try setting a different JdbcType for this parameter or a different configuration property.
Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null .
Try setting a different JdbcType for this parameter or a different configuration property.
Cause: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=.;;, FROM INTO, DRIVER=4.14.137