SYNTAX_ERROR: line 7:30: '=' cannot be applied to decimal(4,0), varchar(4)

0

The following line is where the problem is: where MATERIAL_DOCUMENT_YEAR = '2021' SYNTAX_ERROR: line 7:30: '=' cannot be applied to decimal(4,0), varchar(4) This query ran against the "us_aftersales_atlas_pre" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 08249017-ee19-4f2d-9b9c-4cdfe80d8d98

feita há 2 anos287 visualizações
1 Resposta
0

Hello,

In Athena, values enclosed within single quotes represent string values. I checked through table details and could see column 'MATERIAL_DOCUMENT_YEAR' is defined as decimal(4,0) and thus the error.

To fix this, you can consider any one of the below approaches:

where MATERIAL_DOCUMENT_YEAR = 2021

Or

where MATERIAL_DOCUMENT_YEAR = decimal '2021'
AWS
ENGENHEIRO DE SUPORTE
Nitin_S
respondido há 2 anos
AWS
ESPECIALISTA
avaliado há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas