当我运行查询时:
select count(*) from (select idCover from x90..dimCover group by idCover having count(*) > 1)
我得到错误:
Server: Msg 170, Level 15, State 1, Line 2 Line 2: Incorrect syntax near ')'
如何正确制定此查询?
我在使用SQL Server 2000
在最后一个括号后添加一个别名。
select count(*) from (select idCover from x90..dimCover group by idCover having count(*) > 1) a