Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Parameter query with total

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter query in MS Query from Excel Jimbo Excel Discussion (Misc queries) 1 September 9th 09 04:27 PM
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
How to choose if I use a parameter or not in a parameter query Arnaud Excel Discussion (Misc queries) 0 March 8th 07 01:19 PM
Parameter Query? AcesUp Excel Discussion (Misc queries) 2 August 22nd 05 10:32 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"