I am using a SELECT statement to get data from a table and then insert it into another table. However the line \"stmt.executeQuery(query);\" is inserting the first line fro
if you use the same statement, it will invalidate the previous result set. You should use a different statement to perform updates/inserts.