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
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 :)