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

preguntada hace 2 años287 visualizaciones
1 Respuesta
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
INGENIERO DE SOPORTE
Nitin_S
respondido hace 2 años
AWS
EXPERTO
revisado hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas