Take the 2-minute tour ×  I am trying to write a conditional
batch insert based on Java Parameters, for example
List<Object[]> params = new ArrayList(); params.add(new
Object[]{1, 2, 3});  "INSERT INTO SomeTable( colA, colB, colC)"
+  " VALUES(?, ?, ?)" +  " WHERE EXISTS ( // some condition )",
params);  This obviously does not work, and the closest example
I have found involves selecting the INSERT values from tables,
instead of the List arguments, which is what I need. How can I
reference the Object[] parameters as part of the INSERT values?
Thank you.  share|improve this question  2 Answers 2  I'd say
that you should move this condition in a separate SELECT.
share|improve this answer Can you provide an example? The
problem with SELECT, is that I believe I have to be referencing
table values, whereas I just want to reference the parameter
java variables. –  meiguoren Nov 9 '10 at 4:05  As your example,
you should try following syntax and the
SimpleJdbcOperations.update method:      " SELECT srcA, srcB, s