import from csv with correct number of decimals

[expired user #4890]'s profile image [expired user #4890] posted 14 years ago in Import/Export Permalink
Hi,
When I import a csv-file into a table in Heidi, a too low number of decimals is imported. In Excel, the value has 10 decimals of which only 2 are displayed. Heidi only takes these two, and not the last 8. Since it is a value that represents the date/time, I do need the other decimals. When all decimals are displayed in the csv-file, all decimals are loaded into Heidi correctly.
I tried using decimal (5,10) instead of float (no format specified), but that doesn’t work. Should I better specify the column type somewhere, or is there an elegant way of importing this column correctly without having to adjust all my input files?
Thanks,
Cathelijne
ansgar's profile image ansgar posted 14 years ago Permalink
I guess the Excel export has broken your numbers, but I'm unsure if I understand you right. Please post an extract of your CSV file, so this gets clearer.
[expired user #4890]'s profile image [expired user #4890] posted 14 years ago Permalink
Right, found the solution myself by reading the decimal description better :S It should be decimal (15,10) instead of (5,10). Problem solved... :)

[expired user #4890]'s profile image [expired user #4890] posted 14 years ago Permalink
Thanks anyway by the way!
Oh, and float (15,10) also works for datatype (length/set).

Please login to leave a reply, or register at first.