i user db2 v7.2.
in my jsp page, i get several values via request.getParameterValues() method. i have to insert these values into a table.
my question is, how can i perform this insertion without looping through the values ?
for (i=1; i <= parameter-count; ++i)
st.executeUpdate("insert into table-name (fieldname) values ("+request.getParameter(i)+")");
with this solution i have to access the database parameter-count times.
i want to write something like this :
st.executeUpdate("insert into table-name (fieldname) select id from dummy-table where id in ("+comma-seperated-values.toString()+")");
this way i only had to access the database once.
has anybody a solution ?
thanks in advance