SQL Server subquery syntax

sqlsql server

When I run the query :

select count(*) from 
(select idCover from x90..dimCover group by idCover having count(*) > 1) 

I get the error :

Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near ')'

How do I formulate this query correctly?

I'm on SQL Server 2000

Best Answer

Add an alias after your last bracket.

select count(*) from 
(select idCover from x90..dimCover group by idCover having count(*) > 1) a