distal-attribute
distal-attribute
distal-attribute
distal-attribute

Cutting decimals

pangaea posted 6 years ago in Import/Export
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
rosenfield posted 6 years ago
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?
pangaea posted 6 years ago
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
pangaea posted 6 years ago
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
rosenfield posted 6 years ago
may be related to http://bugs.heidisql.com/868.
pangaea posted 6 years ago
load the latest release 1999 and it dont fix the problem

Best regards

Harald
AliG posted 4 years ago
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 posted 4 years ago
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.
AliG posted 4 years ago
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 posted 4 years ago
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 posted 4 years ago
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.