View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sharad Naik Sharad Naik is offline
external usenet poster
 
Posts: 212
Default SQL - As part of an aggregate function ERROR

I think it should only COUNT(F1) and not COUNT(Mid(......etc.))
Any how count of the first digits and count of the total number will be the
same.

Sharad

"dave k" wrote in message
...
I am trying to extract the first digit of a list of numbers and related
count
of those numbers. In the following SQL statement I get the error "You are
trying to use mid(F1,1,1) as part of an aggregate function error. I am
not
sure what that means and can't find it in the help files.

SELECT mid(F1,1,1), COUNT(mid(F1,1,1)) FROM [" & strRange1 & "]

Any ideas? I have tried using "Group by" witht the same error. Anytime
Count is included in any form I seem to get that error.

Thanks,
Dave