Forums
This topic is locked
Any good query builders out there?
Posted 02 Dec 2003 11:47:12
1
has voted
02 Dec 2003 11:47:12 Russell Marshall posted:
I am trying to write 2 queries in DW MX2004 to calculate grand totals but I cannot get it right. I just cannot get the syntax right.Written mathematically I want the query to do this.
Query 1
(((fld_price) + (fld_bookingfee) + (fld_insuranceprice)) * fld_number) + fld_singlesupplement = Grand total
Query 2
(((fld_price) + (fld_insuranceprice)) * fld_number) + fld_singlesupplement = totalminusbookfee
SELECT "Query 1/2"
FROM tblorderdetail
WHERE fld_clientref = 'MMColParam'
I am using this query to calculate the total booking fee.
SELECT SUM (fld_bookingfee) * SUM(fld_number) AS totalbookingfee
FROM tblorderdetail
WHERE fld_clientref = 'MMColParam'
thanks
Davrus
Russell
Replies
Replied 15 Dec 2003 03:34:29
15 Dec 2003 03:34:29 Phil Shevlin replied: