Skip to Content

A workaround for the identifier too long error?

This code below gives me the identifier too long error and I have been researching a workaround for it. So far nothing good has turned up... Would anyone know how to handle this error?

select name, 
   [If yes, please specify one of the following languages (American Sign 
Language (ASL), Amharic, Chinese, French, Korean, Spanish or Vietnamese):]
from 
(
select name, question, response
from [dw_prod].[dbo].[Assessment$]
) as sourceTable
pivot
(
max (response)
for question
in (
[If yes, please specify one of the following languages (American Sign 
Language (ASL), Amharic, Chinese, French, Korean, Spanish or Vietnamese):]
)
)
as pivottable
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 08 at 04:47 PM

    Hello,

    you have specified the string

    Ifyes, please specify one of the following languages (American SignLanguage(ASL), Amharic, Chinese, French, Korean, Spanish or Vietnamese):

    as the column name for the second column. This string is too long (143 chars), the maximum length is 128 chars.

    Best regards

    Clas Hortien

    Add comment
    10|10000 characters needed characters exceeded

    • This is not possible, you have to shorten it in the select list already. Soemthing like:

      select name, 
         [Choose one: American Sign Language (ASL), Amharic, Chinese, French, Korean, Spanish or Vietnamese]
      from 
      (
      select name, question, response
      from [dw_prod].[dbo].[Assessment$]
      ) as sourceTable
      pivot
      (
      max (response)
      for question
      in (
      [Choose one: American Sign Language (ASL), Amharic, Chinese, French, Korean, Spanish or Vietnamese]
      )
      )
      as pivottable