1 Answer
- Newest
- Most votes
- Most comments
0
Hello,
The error you are facing below is complaining that you are trying to compare varchar(4) (a string of 4 charaters) with Date's.
Error:Query Id: 9e04153d-f799-408c-8ce1-1f65235c4351 Message:[Simba]AthenaJDBC An error has been thrown from the AWS Athena client. TYPE_MISMATCH: line 10:12: Cannot check if varchar(4) is BETWEEN date and date [Execution ID: f08a2c1b-0d7f-4b53-9ec3-dda330031f83]
As you might be aware you cannot use between for string within a range of dates. Both the data type of either side should be same or cast-able to the either value. In you query, the value for 'date' is been taken as a string as opposed to a date value which you might failing to pass in your application. Try the same query with actual values of date and it should work as expected.
Thank you and have a great day.
answered 2 years ago
