Cutting decimals

[expired user #3754]'s profile image [expired user #3754] posted 15 years ago in Import/Export Permalink
Hi,

i have a problem. when i import decimal numers
like 123,456789 then ist cutted to 123 after import in the database.

when i export i see ith right as 123,456789 with comma. looks exactly than my csv file.

Any idea?

Harald
[expired user #1125]'s profile image [expired user #1125] posted 15 years ago Permalink
How do you "import" them?

Which column type are you using? It has to be able to accommodate real numbers, meaning in MySQL it must be "float", "double" or "decimal". Maybe the column type you've chosen can only contain integers?
[expired user #3754]'s profile image [expired user #3754] posted 15 years ago Permalink
coulm type double.
when i type in manually into the db field thre is no problem.

i import as csv, determined by semikolon.
Best regards

Harald
[expired user #3754]'s profile image [expired user #3754] posted 15 years ago Permalink
found the bug.

when i work with heidi i have to type a "," for decimals

when i import i have to use a "."

not satisfies me....

best regards
harald
[expired user #1125]'s profile image [expired user #1125] posted 15 years ago Permalink
may be related to http://bugs.heidisql.com/868.
[expired user #3754]'s profile image [expired user #3754] posted 15 years ago Permalink
load the latest release 1999 and it dont fix the problem

Best regards

Harald
[expired user #4614]'s profile image [expired user #4614] posted 13 years ago Permalink
Hi,
I have similar "issue".

When I insert data manually (into data tab) and I insert eg. "1.22", it inserts only "1" (my local decimal separator is "," and mysql decimal separator is ".")

Maybe it could first check if the users uses dot or comma (check last delimiter)
ansgar's profile image ansgar posted 13 years ago Permalink
That's not an option if you have the dot as the thousand separator in your language. Just use your local number format and you're done.
[expired user #4614]'s profile image [expired user #4614] posted 13 years ago Permalink
well, I copy&paste it from source with the dot ... I thought that it would be easy to automatically convert the "." to ",", but I understand that it is not possible due to different local settings :(
ansgar's profile image ansgar posted 13 years ago Permalink
Yes, I could easily ignore the local settings of each user but I think this is not what the majority of users expect from HeidiSQL. Indeed, there may be quite a few preferring the english/american number format, but this is still subjective and I'm not going to ignore users from other countries.
Olaf789's profile image Olaf789 posted 13 years ago Permalink
Just a friendly reminder smile:
Please thread very carefully here. I have experienced nothing but griefunhappyfrom this subject. You think doubles are a problem? Wait till you get dates. And what happens when you work in international environments en you get appended sets where parts have '.' and others parts have ','. There seems to be no right solution. Satisfying one will immediately cause problems somewhere else.

Personally I would hail the day if ISO came to it senses and decided on one single format.

Good luck
smile

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