Ricka
Ricka

Reputation: 61

SQL Error - has more columns than were specified in the column list

I'm trying to retrieve results from the below query but keep getting this error message:

Msg 8158, Level 16, State 1, Line 1
'a' has more columns than were specified in the column list.

My query:

select
    * 
from 
    (select 
         customer_key as customer_id, updated_by as [Help Desk] 
     from 
         permission) a (nolock)
where 
    [Help Desk] is not null

Upvotes: 6

Views: 23144

Answers (1)

jyao
jyao

Reputation: 1630

select 
    * 
from 
    (select 
         customer_key as customer_id, updated_by as [Help Desk] 
     from 
         permission with (nolock)) as a

Upvotes: 1

Related Questions