Originally posted by Gregg Bolinger:
Well, if you are getting your results back in a ResultSet object, you can print them out in any order you want using the rs.getXXXX() methods. So for example, if you were just printing it on the console and MeterId is a String:
System.out.print(rs.getString("MeterId"));
And so on and so on...
What methods are you using to display the information? That will help better determine the best method for you to display the ResultSet.
I want to display the information summing on the opp_flow column. That is
for a meterid
if(opp_flow=="y")
variable1= total-sum(col1);
else if (opp_flow == "n")
variable1= total+sum(col1);
How do i develop the logic for summing up in the while(rs.next()) loop.
Hope i am clear!!