I am trying to create an update query that is taking a certain set of data and counting the number. I can make the count query work on its own as a select query, but am having problems moving this into an update query.
The select statement:
Code:
SELECT DISTINCT Resource_Pool.Product_Number, Count(*) AS Headcount
FROM Resource_Pool
WHERE (((Resource_Pool.Resource_Pool_Name) Like "*TSmith*"))
GROUP BY Resource_Pool.Product_Number;
I had tried saving the query and using it as a table for my update statement, but recieve the "Syntax Error in query. Incomplete query clause" error. This is what I had:
Code:
UPDATE [Worker Headcount]
LEFT JOIN Products ON [Worker Headcount].Product_Number = Products.ID
SET Products.[Worker Headcount] = [Worker Headcount].[Headcount];
Where [Worker Headcount] was the first select query.
Any clue as to how I can combine these to make a working update statement?? I'm very nearly finished and this last problem is just over my head!
Thank you for any help you may be able to provide!