2014-11-19 2 views
0

나는 다음과 같은 오류 메시지가납니다의 행을 계산하기 위해 사용 :하위 쿼리의 SQL 서버 2008

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' ) 

문제와는 무엇을 내 쿼리?

미리 감사드립니다.

+1

별칭 이름이 – knkarthick24

+1

'AS [수]를 놓친/* 예약 된 단어 */X AS (선택 ...) FROM - –

답변

2

당신이 누락 된 alias name

select count(*) as [count] from 
    (select distinct 
    POSITION, 
    ACQUIESCEMENT, 
    CODE_LIMITE_NATURELLE 
     from avoisine where num_dossier=2 and indice='29' ) A -- Missing 
+0

가 대단히 감사합니다 alias' 필요 :) – mounaim