0

I am importing some data from a spreadsheet in the form of csv. All the data seems to import fine except the amount figure. The data type I have set is "Decimal (15,2)" when I import the value to MySQL the value is different from the original. Example An amount in csv which is 14,250.25 when imported to MySQL it shows as 14.00 I'm not too sure what went wrong. Please advice. Prem.

1 Answer 1

1

Found out myself, if it would help others. I used the ',' as the delimiter, the currency value i had in the spreadsheet (csv) had commas if it was 1,000 or above, so when importing the comma in the currency separated itself and got dumped in the table...

example:

input: 12000.00 -> 12000.00 output this will get imported without any problem

input: 12,000.00 -> 12.00 output if you have assigned "," as the csv delimiter then the number after comma will get split to a new column

Hope it Helps :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.