How to execute query with IN clause in spring?

Posted by GK on Stack Overflow See other posts from Stack Overflow or by GK
Published on 2010-05-11T11:58:33Z Indexed on 2010/05/11 13:14 UTC
Read the original article Hit count: 181

Filed under:
|

I have following code :

try {
            MapSqlParameterSource parameters = new MapSqlParameterSource();
            parameters.addValue("ids", year);

            return this.template.getJdbcOperations().query(
                    "SELECT * FROM INCOME WHERE PROVNUM=? AND FISCALDATE IN ( :ids )", this.rowMapper, parameters);


        }catch (EmptyResultDataAccessException ex) {
            return null;
        }

But i am not able to send the value for PROVNUM. how to do that?

need help, thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about spring