Summing Dollar Amounts from Query- Evaluate? Loop? CFSET? Let SQL DO IT?
Greetings.
I posted this question about 5 years ago. Adding up payments by client. I still have not used this function - long story.
So the query comes from 2 tables- one fetches the orders and the other clients to display the client billing hduring a given period.
SELECT order_ID, order_number, order_client_ID, order_client_fee, order_status_ID, order_report_sent_date, order_property_street, order_property_city, client_ID, client_company, client_status
FROM main_orders, lookup_clients
WHERE order_client_ID = client_ID
AND order_client_ID = #FORM.client_ID#
AND order_status_ID = 9
AND client_status = 1
AND (order_report_sent_date BETWEEN #Session.StartDate# AND #Session.EndDate#)
ORDER BY order_report_sent_date ASC
Each payment diplays as #DollarFormat(order_client_fee)#
I simply need a sum column. Any help would be apreciated. The simpler the better! Thanks in advance.
