D
Din Zavery
Hello Everyone,
I'm trying to UPDATE a field in a table from a sum of fields from another
table. The field is called YTDBusiness in Customer Table. I need a total/sum
from a field called FareAgreed in Trip Table to reflect in Customer table.
Both the tables are related and have customerid as a common field in both.
The SQL statement i'm trying to run is as below but all I get are zeros
rather than the sum of each customers fareagreed total reflecting in
customer table.
UPDATE Customer INNER JOIN Trip ON Customer.CustomerID = Trip.CustomerID SET
Customer.YTDBusiness = Sum([Trip].[FareAgreed])
WHERE (([Customer].[CustomerId]=[Trip].[CustomerID]));
All the help will be appreciated
Thanks and Regards
Din Zavery
I'm trying to UPDATE a field in a table from a sum of fields from another
table. The field is called YTDBusiness in Customer Table. I need a total/sum
from a field called FareAgreed in Trip Table to reflect in Customer table.
Both the tables are related and have customerid as a common field in both.
The SQL statement i'm trying to run is as below but all I get are zeros
rather than the sum of each customers fareagreed total reflecting in
customer table.
UPDATE Customer INNER JOIN Trip ON Customer.CustomerID = Trip.CustomerID SET
Customer.YTDBusiness = Sum([Trip].[FareAgreed])
WHERE (([Customer].[CustomerId]=[Trip].[CustomerID]));
All the help will be appreciated
Thanks and Regards
Din Zavery