finding maximum value
0 posts in topic
Flat View  Flat View

Posted By:   Anonymous
Posted On:   Thursday, June 24, 2004 05:53 AM

I have connected to excel sheet using jdbc and retrieved the results with the below code
ResultSet rs = st.executeQuery("select organization,price,comm,percent from [Total$]");
while (rs.next())
String s1 = rs.getString(1);
int s2 = rs.getInt(2);
int s3 = rs.getInt(3);
int s4 = rs.getInt(4);
System.out.println( s1 +" " + s2 +" " + s3 +" " + s4);
now,I want to find the maximum of (percent) and minimum of (price) columns
and display it one by one. Any suggestion or code examples will be appreciated. Thanx in advance.

About | Sitemap | Contact