Posted by Robert Klemme on 11/22/05 18:57
laurenq uantrell wrote:
> Jees! I'd better start drinking coffee in the morning!
:-))
> Thanks.
In fact there was a typo - 1 "select" too much:
select @EmployeeCities = count(distinct City) from tblEmployees
> I must
> have wasted 30 minutes trying to put a GROUPBY subquery inside a COUNT
> subquery before seeking help!
You mean like
select @EmployeeCities = count(*) from (select City from tblEmployees
group by City) x
?
Cheers
robert
[Back to original message]
|