0

I have imported CSV file in SQLite Studio. I know want to change column data types and I have problems with decimal numbers. In column X I have numbers like:

636000

432.25

4.49

8.96

269906.81

6.26

Then I want to convert them to decimal(10,2) so I could for example get right maximum of the column X. When converting, I get this numbers:

636000

432.25

4.4900000000000002

8.9600000000000009

269906.81

6.2599999999999998

Why is that so? Thanks for help.

MWiesner
  • 8,868
  • 11
  • 36
  • 70
ketic
  • 1
  • Read [this](http://stackoverflow.com/questions/21757722/how-to-use-sqlite-decimal-precision-notation). The post says that the datatype seems to be ignored. Conversion may as well not work as you expected. How are you converting? Are you using any of **ALTER TABLE** kind of sql statement? If that doesn't work, you may want to consider exporting data to a file and importing it back into altered table. – blackpen Oct 28 '16 at 08:30
  • SQLiteStudio 3.1.0 has a bug which causes those numbers to be displayed with so many decimal points. In few days new version will be released which does not have this bug. Nevertheless, numbers in your database are correct, it's just SQLiteStudio that is displaying them incorrectly. – Googie Oct 28 '16 at 12:09
  • I see this is a problem in SQLiteStudio. I have opened the same file in DB Browser for SQLite and it worked just fine. Thank you again. – ketic Nov 04 '16 at 11:43

0 Answers0