Announcement Announcement Module
Collapse
No announcement yet.
NamedParameterORJdbcTemplate attempting to pass list as a parameter with hextoraw val Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NamedParameterORJdbcTemplate attempting to pass list as a parameter with hextoraw val

    Hi,

    I would like to execute below SQL query using JDBCTemplate OR NamedParameterJdbcTemplate.

    DELETE FROM bar WHERE foo IN (hextoraw('X'),hextoraw('X'),hextoraw('X'));

    Map<String, Object> namedParameters = new HashMap<String, Object>();
    namedParameters.put("testList", testList);

    int rowsDeleted = getNamedParameterJdbcTemplate().update(deleteQuery , namedParameters);

    How to pass hextoraw() function to each parameter value? Is there way we can mention to wrap value with hextoraw()?

    Thanks
    Last edited by ncsekhar25; Jan 9th, 2013, 02:03 PM.
Working...
X