This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes sum funtion based on sytem dates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "sum funtion based on sytem dates" Watch "sum funtion based on sytem dates" New topic
Author

sum funtion based on sytem dates

arjun rampal
Ranch Hand

Joined: Jul 08, 2005
Posts: 125
Hi I have a column "TOTAL" which is adding numbers in it rows.I am using SUM Function for that.
Problem-I dont want the sum of all rows .I want sum of only last 5 days before system date.
for example if today is 29 october as per my computer.I want summantion of 23+25+26+27+28+29(24 not included as it is sunday).

it would be greate if solution would be specific

is that possible if yes how?
present query SUM(TOTAL)

REGARDS
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Just filter on your criteria in the where clause.


Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
Consider Paul's rocket mass heater.
 
subject: sum funtion based on sytem dates
 
Similar Threads
Calculate sum in jtable and display the sum in jtextfield
How i will display Total Value for all the page
for Loops with PrintWriter
Getting totals of rows in SQL
Percision problems with Double and Float numbers