I’m very new to Sql, and having trouble wrapping my brain around the syntax. I have a table PM (with Fields Acct, Amt, Action, Reason), and I need to update a few fields in the table wherever count(Acct)>1, and the Amt is the same. Specifically, based on this select statement:
SELECT PM.Acct, PM.Amt
FROM PM
GROUP BY PM.Amt
HAVING (((Count(PM.Acct))>1));
That code returns the records I know need to be changed, anyway. Once someone explains it, I’m sure it will be obvious, but I’m stuck.
You can do it this way, then you are still using your
GROUP BYfor yourAmt. This was tested in MS Access 2003 and only updates the records in the sub-query: