MySQL Forums
Forum List  »  Knowledge Base

csv import rounds decimal value
Posted by: D Koper
Date: March 14, 2009 02:31PM

Hi,

When I import a csv file into my MySQL database decimal values are rounded up (or down) in the decimal column.

I.e. In my csv file I have a decimal value 1234.5678 (or 1234,5678). In my table I have a column set as DECIMAL(12,5). MySQL converts the decimal value into 1234.0000 after import.

Is there a way to import decimal values into the MySQL database without rounding (or actually truncating)?

I allready tried to set the column to VARCHAR but this breaks up my application.

Options: ReplyQuote


Subject
Views
Written By
Posted
csv import rounds decimal value
6763
March 14, 2009 02:31PM
2971
March 22, 2009 07:35AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.