-
Jan 9th, 2013, 01:36 PM
#1
Issue with NamedParameterJdbcTemplate using list as a parameter
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?
when getNamedParameterJdbcTemplate().update() excutes I want generated SQL query should look like this
DELETE FROM TABLE WHERE COLUMN_ID IN (hextoraw(?),hextoraw(?),hextoraw(?));
Is there way we can do this? Please help me.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules