J
Jeffrey
I wish to update a field AggregateBen in table B with the
sum total of field Ben in table A, where the records are
sorted and grouped by field AN. I can get the sum total
of field Ben in table A by
SELECT A.AN, Sum(A.Ben) AS SumOfBen
FROM A
GROUP BY A.AN;
I now have to somehow use the above as a Subquery
following an Update query:
UPDATE B SET AggregateBen = SELECT A.AN, Sum(A.Ben) AS
SumOfBen
FROM A
GROUP BY A.AN;
Only I get an syntax Missing Operator message when I try
to run this. What am I doing wrong? Thanks.
sum total of field Ben in table A, where the records are
sorted and grouped by field AN. I can get the sum total
of field Ben in table A by
SELECT A.AN, Sum(A.Ben) AS SumOfBen
FROM A
GROUP BY A.AN;
I now have to somehow use the above as a Subquery
following an Update query:
UPDATE B SET AggregateBen = SELECT A.AN, Sum(A.Ben) AS
SumOfBen
FROM A
GROUP BY A.AN;
Only I get an syntax Missing Operator message when I try
to run this. What am I doing wrong? Thanks.