Re: SUM function
I am very very sorry!
You are right! there was no difference...
Now I am sending the two statements again:
This one is working fine:
SELECT DISTINCT nav.navperunit, Invest_History.client_acct, customers.subunit, Invest_History.redemption_unit, Invest_History.addition_unit, Invest_History.transfer_unit, format(((customers.subunit - SUM(Invest_History.redemption_unit) + SUM(Invest_History.addition_unit)) * nav.navperunit) ,3) AS TotalPerf
FROM customers, Invest_History, nav
WHERE nav.period = 'colname' AND customers.client_acct = Invest_History.client_acct AND customers.active = 'Y'
GROUP BY Invest_History.client_acct
This one is not:
SELECT DISTINCT nav.navperunit, Invest_History.client_acct, customers.subunit, Invest_History.redemption_unit, Invest_History.addition_unit, Invest_History.transfer_unit, format(SUM((customers.subunit - SUM(Invest_History.redemption_unit) + SUM(Invest_History.addition_unit)) * nav.navperunit) ,3) AS Total
FROM customers, Invest_History, nav
WHERE nav.period = 'colname' AND customers.client_acct = Invest_History.client_acct AND customers.active = 'Y'
GROUP BY nav.period
The only difference is a SUM after "format"
Thank you for catching that up!!!!!!!!
Caroline