G
Guest
Currently I have this query to keep track of inventory. I would like to
create an accurate restock routine however.
UPDATE ToolData AS T INNER JOIN ToolCribSignOut AS S ON
T.ToolCribDesignation=S.ToolCribDesignation SET T.Inventory =
T.Inventory-S.SignOutQuantity
WHERE S.[TIMESTAMP] = (SELECT MAX([TIMESTAMP]) FROM ToolCribSignOut);
So...after this portion of the query has run, I would like it to ask one
more question: If T.Inventory is <= T.MinQuantity, then insert the date
into T.LeadStart, else do nothing. However i don't want a value to be
overwritten if there is one already there.
Any help writing this code is welcomed!
create an accurate restock routine however.
UPDATE ToolData AS T INNER JOIN ToolCribSignOut AS S ON
T.ToolCribDesignation=S.ToolCribDesignation SET T.Inventory =
T.Inventory-S.SignOutQuantity
WHERE S.[TIMESTAMP] = (SELECT MAX([TIMESTAMP]) FROM ToolCribSignOut);
So...after this portion of the query has run, I would like it to ask one
more question: If T.Inventory is <= T.MinQuantity, then insert the date
into T.LeadStart, else do nothing. However i don't want a value to be
overwritten if there is one already there.
Any help writing this code is welcomed!