G
Guest
I am not too familiar with update queries but I think I'm close.
I have 2 tables: ToolData and ToolCribSignOut, each related through the
ToolCribDesignation (TCD).
My goal is to find records from whenever I run the query (now) back 3
months, to sum up the sign out quantities by TCD, to divide this number by
90, and then multiply by 1.2.
This number then needs to be saved into a column called MinQuantity in
ToolData.
So far I have written this but there is a problem with the syntax:
UPDATE ToolData AS T INNER JOIN ToolCribSignOut AS S ON
T.ToolCribDesignation=S.ToolCribDesignation SET T.MinQuantity = sum
S.SignOutQuantity / 90 * 1.2
WHERE S.[DateModified] = mm (now -3) FROM ToolCribSignOut;
Can anyone help please?!
I have 2 tables: ToolData and ToolCribSignOut, each related through the
ToolCribDesignation (TCD).
My goal is to find records from whenever I run the query (now) back 3
months, to sum up the sign out quantities by TCD, to divide this number by
90, and then multiply by 1.2.
This number then needs to be saved into a column called MinQuantity in
ToolData.
So far I have written this but there is a problem with the syntax:
UPDATE ToolData AS T INNER JOIN ToolCribSignOut AS S ON
T.ToolCribDesignation=S.ToolCribDesignation SET T.MinQuantity = sum
S.SignOutQuantity / 90 * 1.2
WHERE S.[DateModified] = mm (now -3) FROM ToolCribSignOut;
Can anyone help please?!