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

已提問 2 年前檢視次數 287 次
1 個回答
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
支援工程師
Nitin_S
已回答 2 年前
AWS
專家
已審閱 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南