OK can anyone help with this little sql problem. OK I have built a site that is monitoring reservoir in Co.Donegal, Ireland. The reservoir has a pump which basically fills up the reservoir to the required level. During this event for however long, an hourly signal is sent with the flowrate (litres pumped in) for that hour. So if it takes 4 hours to get it back up to the required level there a four records in the database of hourly flow levels. When the pump starts to pump its sends an email to our server so then we create a session state for that activity. So, how do I add up all those records. I can SELECT litresPumped, pumpSession WHERE session = 1 To get the beginning and SELECT pumpsession WHERE session = 0 To get the end How do I do this or is there a simple way John Northern Ireland Derry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
