4 Answers
- Newest
- Most votes
- Most comments
0
I see the problem. The CAST includes the "as int". Try this:
, (CASE hoeveelheid WHEN '' THEN null else (CAST(Replace(hoeveelheid, ',00', '') as int)) END) hoeveelheid
answered 2 years ago
0
You don't mention which AWS service you are using, but if you're using redshift, did you see this document on TO_NUMBER?
https://docs.aws.amazon.com/redshift/latest/dg/r_TO_NUMBER.html
answered 2 years ago
0
This will probably help you more than my previous answer. Just saw the athena tag.
answered 2 years ago
0
Thank you for your answers. I think I'm close but I still get erros. Now I'm using this:
, (CASE hoeveelheid WHEN '' THEN null else (CAST(Replace(hoeveelheid, ',00', '')) as int) END) hoeveelheid
The error: line 7:81: mismatched input ')'. Expecting: <expression>
answered 2 years ago
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago