Read amounts written with a decimal comma (consultancy)
A German export writes 1.234,56 for one thousand two hundred thirty-four point five six. Convert it with the de-DE culture.
- Level
- intermediate
- Time
- ~7 min
- Task
- Build the query
- Access
- Free — no account needed
Loading the practice workspace…
About this exercise
What you'll practise
Convert locale-formatted numbers using the source's culture, not the machine's.
Brightline Advisory (fictional) reimburses consultants' expenses. Finance exports claims monthly from the expense tool.
Steps
- The file uses
;as delimiter. Use the first row as headers. - Convert
Amountto a decimal number using thede-DEculture. - Keep
ClaimIDandAmount.
Your result must
- Amount is a number
- 1.234,56 becomes 1234.56
- Two columns
Input
- ClaimsDE (file)
- Text file; first line: ClaimID;Amount
- Every field is text until you set types
Expected output columns
ClaimID (text), Amount (number)
| ClaimID | Amount |
|---|---|
| C-0001 | 3865.96 |
| C-0002 | 408.02 |
| C-0003 | 152.75 |