大家帮忙看看这个查询语句哪里不对?
update temp_kcmove_mx set cgth=cgth+q.cgth from temp_kcmove_mx t ,
(select sp_id,sp_name,sum(num) as cgth from ckls
where (sh_date >'1900-01-01' and sh_date <'2012-10-09')
and dj_flag=1106 group by sp_id,sp_name) q where t.sp_id=q.sp_id
and t.sp_name=q.sp_name
我希望在access和sql里都能通用,谢谢了。