I have a query in Microsoft query in which I want to count the results. In
addition, I want to have a parameter. I can set up the parameter or I can set
up the count, but it won't let me do both. Once the count is in place, if I
try to add a parameter, I get an error that says "Invalid column name
'Parameter1'. Statement(s) could not be prepared. If I remove the count and
add the parameter and then try to put the count back in, I get the same
error.
It's a simple query:
SELECT Worker.WorkerName, zCSContactMethod.LookupCode,
zCSContactMethod.LookupDesc, Count(CustomerService.ContactMethod) AS 'Count
of ContactMethod'
FROM IL_PSILink.dbo.CustomerService CustomerService, IL_PSILink.dbo.Worker
Worker, IL_PSILink.dbo.zCSContactMethod zCSContactMethod
WHERE CustomerService.WorkerID = Worker.WorkerID AND
CustomerService.ContactMethod = zCSContactMethod.LookupCode
GROUP BY Worker.WorkerName, zCSContactMethod.LookupCode,
zCSContactMethod.LookupDesc
HAVING (zCSContactMethod.LookupDesc='Call')
Any help would be much appreciated.
--
Megan M
Bookmarks