File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
maximum value of a column
Joined: Jan 13, 2009
Jun 08, 2009 06:01:35
I am trying to add rows to a table (name : csv) whose schema is
ID Name Place
-- ------ --------
ResultSet res = stmt.executeQuery("select max(id) as id from csv");
int i = res.getInt("id");
i want to get the maximum value of ID . when i typed the above code, i get SQLException. what shall i do.
Joined: Feb 18, 2008
Jun 08, 2009 06:29:36
ResultSet res = stmt.executeQuery("select max(id) as id from csv"); res.next(); int i = res.getInt("id"); i++;
you have to move the resultset to some specific location before doing get operation
I agree. Here's the link:
subject: maximum value of a column
iterate a doc with sax and change xpath expression at run time
display tag issue
object tag and csv file
text input onblur calls a js function for formatting of the input data
read from csv: how to handle null?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014