G
Guest
I'm having an issue with an aggregate function in line 6 of the code below.
The error is: "An aggregate may not appear in the set list of an UPDATE
statement."
How can i SUM this value successfully? Thanks experts.
CREATE Trigger AvailableLogFootage
on tblLogs
FOR INSERT
As
UPDATE tblLogs
Set UnDesignatedFootage = Sum(tblBundles.CurrentFootage)
FROM tblLogs
INNER JOIN tblBundles ON tblLogs.FlitchNum = tblBundles.FlitchNum
WHERE tblBundles.IsDesignated = 'N'
The error is: "An aggregate may not appear in the set list of an UPDATE
statement."
How can i SUM this value successfully? Thanks experts.
CREATE Trigger AvailableLogFootage
on tblLogs
FOR INSERT
As
UPDATE tblLogs
Set UnDesignatedFootage = Sum(tblBundles.CurrentFootage)
FROM tblLogs
INNER JOIN tblBundles ON tblLogs.FlitchNum = tblBundles.FlitchNum
WHERE tblBundles.IsDesignated = 'N'