Is it possible to generate arbitrary \"in ()\" lists in a SQL query through Jdbc template:
example:
\"select * from t where c in (#)\" , However \'#\' could
In Hibernate , you can use following sample:
if(tenors != null && tenors.length >0) sql.append(" and ip.tenor_id in (:tenors)"); ..... if(tenors != null && tenors.length >0){ query.setParameterList("tenors", tenors); } ..... SQLQuery query = (SQLQuery) getSession().createSQLQuery(sql.toString())