【发布时间】:2014-11-19 16:39:47
【问题描述】:
我收到以下错误消息:
Msg 102, Level 15, State 1, Line 6
Incorrect syntax near ')'.
在尝试运行以下查询时:
select count(*) as count from
(select distinct
POSITION,
ACQUIESCEMENT,
CODE_LIMITE_NATURELLE
from avoisine where num_dossier=2 and indice='29' )
我的查询有什么问题?
提前致谢。
【问题讨论】:
-
AS [count] /* reserved word */ FROM (select ...) AS x -- need alias
标签: sql-server sql-server-2008 count subquery