I need to select the first record of a sorted table to move one of the fields of that record to a different table using an sql statement(s) in java. Please help someone?
Thanks in advance
Thanks in advance
sql = "SELECT TOP 1 Team FROM GroupA";
rs = set.executeQuery(sql);
while (rs.next()) {
String result = rs.getString("Team");
sql2 = "UPDATE SemiFinals SET TeamA = '" + result + "' WHERE MatchNo = '1'";
set.executeUpdate(sql2); }
java.sql.SQLException: ResultSet is closed
Comment