Aim: I would like to print line the output of the below SQL statment. Normally I use rs.getString("rowname") however SUM doesn’t specify a COLUMN, so I am a little stumped on how this can be done.
SELECT SUM(HOURS) FROM RESOURCE WHERE DATE = '02/08/2013'; --Actual SQL Query as used below
ResultSet rs = stat.executeQuery("SELECT SUM(HOURS) FROM RESOURCE WHERE DATE = '02/08/2013';");
out.println("<tr>");
out.println("<td>" + rs.get + "</td>");
out.println("</tr>");
}
Did you try
Note
avoid mixing code and view