Dear all,
I find that Access cannot use "group by" in the sub query. The following query will prompt up a message "Operation must use an updatable query." if being run:
update Summary as s inner join
(SELECT refno, sum(amount) as s_amount
FROM Details
WHERE Refno = '20090213001'
group by r.refno
) as d on s.refno=d.refno
set s.amount=d.s_amount
If I remove the "group by" and "sum(amount)" in the above statement, this update query is runable.
How to solve this problem or is there any workaround for this kind of SQL statement?
Many thanks
I find that Access cannot use "group by" in the sub query. The following query will prompt up a message "Operation must use an updatable query." if being run:
update Summary as s inner join
(SELECT refno, sum(amount) as s_amount
FROM Details
WHERE Refno = '20090213001'
group by r.refno
) as d on s.refno=d.refno
set s.amount=d.s_amount
If I remove the "group by" and "sum(amount)" in the above statement, this update query is runable.
How to solve this problem or is there any workaround for this kind of SQL statement?
Many thanks
