An easy way is select sum(column_name) AS sum from table_name

Then getInt("sum")

Hope that helps,
Peter Dolukhanov

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED] On Behalf Of Ed Ventura
Sent: 02 June 2003 18:36
To: [EMAIL PROTECTED]
Subject: Re: Adding up all values in a column.

Thank you, emmanuel. How do I return this value to the user's screen in
a
jsp page?

Thanks,
Ed.


> From: Emmanuel Eze <[EMAIL PROTECTED]>
> Reply-To: A mailing list about Java Server Pages specification and
reference
> <[EMAIL PROTECTED]>
> Date: Fri, 30 May 2003 17:27:01 +0200
> To: [EMAIL PROTECTED]
> Subject: Re: Adding up all values in a column.
> 
> select sum(column_name) from table_name
> 
> 
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and
reference
> [mailto:[EMAIL PROTECTED] Behalf Of Ed Ventura
> Sent: Friday, May 30, 2003 6:08 PM
> To: [EMAIL PROTECTED]
> Subject: Adding up all values in a column.
> 
> 
> How would I go about adding up all the values in a database column and
then
> displaying that total to the user? I�m using oracle.
> 
> Thanks,
> Ed ventura.

To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

==========================================================================To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to