Please help with update/join/sum query

G

Guest

Hello,
Trying to perform an update with a join & sum in the same query.
Maybe I can't do it in access - but I have to get this to work somehow...

Here's what I have:
update ((T INNER JOIN RT
ON T.RevenueID = RT.RevenueID)
INNER JOIN PA
ON RT.PlatinumGL = PA.PlatinumID)
Set T.RebateAdjustment = sum(RT.AFDRebate)
Group By T.RebateAdjustment, T.RevenueID

Basically I need to:
Update T.RebateAdjustment with the sum of RT.AFDRebate IF
RT.PlatinumGL exists in the PA table.

The error I get is:
Syntax error missing operator in query expression
'sum(RT.AFDRebate) Group By T.RebateAdjustment'.

Please help me!
Thanks.
 
M

[MVP] S.Clark

I would perform the sum in a seperate query, then link that to this query,
instead of trying to do the sum there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top