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

demandé il y a 2 ans287 vues
1 réponse
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
INGÉNIEUR EN ASSISTANCE TECHNIQUE
Nitin_S
répondu il y a 2 ans
AWS
EXPERT
vérifié il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions