Quote:
Originally Posted by MapGeek
Incidentally, so as not to mislead anyone reading this, in my previous reply I was wrong about SELECT COUNT(*) FROM (SELECT ...). It also generates a syntax error. Maybe you just can't use the COUNT function with a subquery in any way, at least with SQL Server.
|
MapGeek,
Could you try aliasing the subquery:
SELECT COUNT(*) FROM (SELECT ...) as u
I am not a SQL Server user so I might be completely wrong in my guess.
Hope this helps.
Dimitar