Results 1 to 1 of 1

Thread: NamedParameterORJdbcTemplate attempting to pass list as a parameter with hextoraw val

  1. #1
    Join Date
    Jan 2013
    Posts
    2

    Default 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 at 01:03 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •