Avatar of Murray Brown
Murray Brown
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Access SQL Update with Max not working

Hi

In Access I am getting the error "Your query does not include the specified expression ‘LastRenewalDate’ as part of an aggregate function" for the following

UPDATE t_Licence INNER JOIN t_Renewals ON t_Licence.LicenceNumberPK = t_Renewals.LicenceNumberFK SET t_Licence.LastRenewalDate = Max(t_Renewals.RenewalDate)
WHERE (((t_Renewals.LicenceNumberFK)=[t_Licence].[LicenceNumberPK]));

I previously ran the query without the Max in it and it worked fine

UPDATE t_Licence INNER JOIN t_Renewals ON t_Licence.LicenceNumberPK = t_Renewals.LicenceNumberFK SET t_Licence.LastRenewalDate = t_Renewals.RenewalDate
WHERE (((t_Renewals.LicenceNumberFK)=[t_Licence].[LicenceNumberPK]));
Microsoft AccessSQL

Avatar of undefined
Last Comment
Murray Brown

8/22/2022 - Mon
SOLUTION
slightwv (䄆 Netminder)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
PatHartman

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Murray Brown

ASKER
thanks very much
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck