Update a table based on another query? (1 Viewer)

EVQ

New member
Local time
Today, 03:31
Joined
Jan 24, 2014
Messages
1
hi - i have the below query that inserts the manager name once and the count of how many records are assigned to that manager with an EmpConsultantIndicator value that = e


SELECT DISTINCT CopyMasterResource.Manager, Count(CopyMasterResource.EmpConsultantIndicator) AS [FTE Count] INTO WeeklyWalk
FROM CopyMasterResource
GROUP BY CopyMasterResource.Manager, CopyMasterResource.EmpConsultantIndicator
HAVING (((CopyMasterResource.Manager) Not Like '*tbd*') AND ((CopyMasterResource.EmpConsultantIndicator)='e'));


i need to add another field to the WeeklyWalk table (the FTC Count field) that will also show the count for the EmpConsultantIndicator that = c

i have the query written below

SELECT DISTINCT CopyMasterResource.Manager, Count(CopyMasterResource.EmpConsultantIndicator) AS [FTC Count]
FROM CopyMasterResource
GROUP BY CopyMasterResource.Manager, CopyMasterResource.EmpConsultantIndicator
HAVING (((CopyMasterResource.Manager) Not Like '*tbd*') AND ((CopyMasterResource.EmpConsultantIndicator)
='c'));


i cannot however figure out how to append these counts to the WeeklyWalk table on the correct manager

i tried building the update query in design view but it just isn't working - it is probably something simple but if anyone can point out the way to do this - that would be much appreciated

thanks!
 

plog

Banishment Pending
Local time
Today, 02:31
Joined
May 11, 2011
Messages
11,613
UPDATE and MAKE TABLE queries are usually a sign of you doing something wrong. Why must you move data around in this database? Why not just use a select query to get the data you need?
 

Users who are viewing this thread

Top Bottom