![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm administrating a mysql db via phpmyadmin and there's a VARCHAR field 'total' with some data stored in, i.e. 1432,26 (as Euro format). I want to convert the VARCHAR type in DECIMAL or DOUBLE type because of some calculating problems, and I've tried to change the field's type (using phpmyadmin) from VARCHAR 16 into DECIMAL 16,2 but the result is 1432,00 and decimal ciphers were lost. In which way can I change field format? |
|
total | cast(total as decimal(6,2)) | +---------+-----------------------------+ 1432,26 | 1432.00 | 1432.26 | 1432.26 | +---------+-----------------------------+ |
#3
| |||
| |||
|
|
Hi, I'm administrating a mysql db via phpmyadmin and there's a VARCHAR field 'total' with some data stored in, i.e. 1432,26 (as Euro format). I want to convert the VARCHAR type in DECIMAL or DOUBLE type because of some calculating problems, and I've tried to change the field's type (using phpmyadmin) from VARCHAR 16 into DECIMAL 16,2 but the result is 1432,00 and decimal ciphers were lost. In which way can I change field format? |
#4
| |||
| |||
|
|
I'm administrating a mysql db via phpmyadmin and there's a VARCHAR field 'total' with some data stored in, i.e. 1432,26 (as Euro format). I want to convert the VARCHAR type in DECIMAL or DOUBLE type because of some calculating problems, and I've tried to change the field's type (using phpmyadmin) from VARCHAR 16 into DECIMAL 16,2 but the result is 1432,00 and decimal ciphers were lost. In which way can I change field format? |
![]() |
| Thread Tools | |
| Display Modes | |
| |