rounding digits after decimal sign
5 answers - 876 bytes -

Hello,
Can anyone point me to a section of manual or link how to reduce digits
after
a decimal sign?
I have a table
mysqldesc part;
| Field | Type | Null | Key | Default | Extra |
| kod | varchar(255) | YES | | NULL | |
| bulstat | double(15,5) | YES | MUL | NULL | |
| Land | varchar(3) | YES | MUL | NULL | |
| ID | varchar(15) | YES | MUL | NULL | |
| IME | varchar(100) | YES | MUL | NULL | |
| VALUE | double(15,5) | YES | | NULL | |
| CNT | smallint(5) | YES | | NULL | |
| Date | datetime | YES | | NULL | |
and in bulstat column i have digits like 831690750.00000
which i would like round to the last whole digit.
Also could someone give a hint how to recode digits in order to anonymize
data.
My end goal is to export the dataset into a social network software for my
thesis.
Thanks,
No.1 | | 1547 bytes |
| 
Hi,
If you want to round your value to the specified no. of digits, use round().
Else if you want to extract the values without rounding use truncate().
mysql select round(blustat,2) from parts; [the value will get rounded to
the nearest decimal]
or
mysql select truncate (blustat,2) from parts; [no rounding, simply
extract only the value of specified digits]
For More
Thanks,
ViSolve DB Team
Message
From: "Dimitar Vasilev" <dimitar.vassilev (AT) gmail (DOT) com>
To: <mysql (AT) lists (DOT) mysql.com>
Sent: Thursday, February 01, 2007 1:40 AM
Subject: rounding digits after decimal sign
Hello,
Can anyone point me to a section of manual or link how to reduce digits
after
a decimal sign?
I have a table
mysqldesc part;
| Field | Type | Null | Key | Default | Extra |
| kod | varchar(255) | YES | | NULL | |
| bulstat | double(15,5) | YES | MUL | NULL | |
| Land | varchar(3) | YES | MUL | NULL | |
| ID | varchar(15) | YES | MUL | NULL | |
| IME | varchar(100) | YES | MUL | NULL | |
| VALUE | double(15,5) | YES | | NULL | |
| CNT | smallint(5) | YES | | NULL | |
| Date | datetime | YES | | NULL | |
and in bulstat column i have digits like 831690750.00000
which i would like round to the last whole digit.
Also could someone give a hint how to recode digits in order to anonymize
data.
My end goal is to export the dataset into a social network software for my
thesis.
Thanks,
No.2 | | 1547 bytes |
| 
Hi,
If you want to round your value to the specified no. of digits, use round().
Else if you want to extract the values without rounding use truncate().
mysql select round(blustat,2) from parts; [the value will get rounded to
the nearest decimal]
or
mysql select truncate (blustat,2) from parts; [no rounding, simply
extract only the value of specified digits]
For More
Thanks,
ViSolve DB Team
Message
From: "Dimitar Vasilev" <dimitar.vassilev (AT) gmail (DOT) com>
To: <mysql (AT) lists (DOT) mysql.com>
Sent: Thursday, February 01, 2007 1:40 AM
Subject: rounding digits after decimal sign
Hello,
Can anyone point me to a section of manual or link how to reduce digits
after
a decimal sign?
I have a table
mysqldesc part;
| Field | Type | Null | Key | Default | Extra |
| kod | varchar(255) | YES | | NULL | |
| bulstat | double(15,5) | YES | MUL | NULL | |
| Land | varchar(3) | YES | MUL | NULL | |
| ID | varchar(15) | YES | MUL | NULL | |
| IME | varchar(100) | YES | MUL | NULL | |
| VALUE | double(15,5) | YES | | NULL | |
| CNT | smallint(5) | YES | | NULL | |
| Date | datetime | YES | | NULL | |
and in bulstat column i have digits like 831690750.00000
which i would like round to the last whole digit.
Also could someone give a hint how to recode digits in order to anonymize
data.
My end goal is to export the dataset into a social network software for my
thesis.
Thanks,
No.3 | | 1547 bytes |
| 
Hi,
If you want to round your value to the specified no. of digits, use round().
Else if you want to extract the values without rounding use truncate().
mysql select round(blustat,2) from parts; [the value will get rounded to
the nearest decimal]
or
mysql select truncate (blustat,2) from parts; [no rounding, simply
extract only the value of specified digits]
For More
Thanks,
ViSolve DB Team
Message
From: "Dimitar Vasilev" <dimitar.vassilev (AT) gmail (DOT) com>
To: <mysql (AT) lists (DOT) mysql.com>
Sent: Thursday, February 01, 2007 1:40 AM
Subject: rounding digits after decimal sign
Hello,
Can anyone point me to a section of manual or link how to reduce digits
after
a decimal sign?
I have a table
mysqldesc part;
| Field | Type | Null | Key | Default | Extra |
| kod | varchar(255) | YES | | NULL | |
| bulstat | double(15,5) | YES | MUL | NULL | |
| Land | varchar(3) | YES | MUL | NULL | |
| ID | varchar(15) | YES | MUL | NULL | |
| IME | varchar(100) | YES | MUL | NULL | |
| VALUE | double(15,5) | YES | | NULL | |
| CNT | smallint(5) | YES | | NULL | |
| Date | datetime | YES | | NULL | |
and in bulstat column i have digits like 831690750.00000
which i would like round to the last whole digit.
Also could someone give a hint how to recode digits in order to anonymize
data.
My end goal is to export the dataset into a social network software for my
thesis.
Thanks,
No.4 | | 1547 bytes |
| 
Hi,
If you want to round your value to the specified no. of digits, use round().
Else if you want to extract the values without rounding use truncate().
mysql select round(blustat,2) from parts; [the value will get rounded to
the nearest decimal]
or
mysql select truncate (blustat,2) from parts; [no rounding, simply
extract only the value of specified digits]
For More
Thanks,
ViSolve DB Team
Message
From: "Dimitar Vasilev" <dimitar.vassilev (AT) gmail (DOT) com>
To: <mysql (AT) lists (DOT) mysql.com>
Sent: Thursday, February 01, 2007 1:40 AM
Subject: rounding digits after decimal sign
Hello,
Can anyone point me to a section of manual or link how to reduce digits
after
a decimal sign?
I have a table
mysqldesc part;
| Field | Type | Null | Key | Default | Extra |
| kod | varchar(255) | YES | | NULL | |
| bulstat | double(15,5) | YES | MUL | NULL | |
| Land | varchar(3) | YES | MUL | NULL | |
| ID | varchar(15) | YES | MUL | NULL | |
| IME | varchar(100) | YES | MUL | NULL | |
| VALUE | double(15,5) | YES | | NULL | |
| CNT | smallint(5) | YES | | NULL | |
| Date | datetime | YES | | NULL | |
and in bulstat column i have digits like 831690750.00000
which i would like round to the last whole digit.
Also could someone give a hint how to recode digits in order to anonymize
data.
My end goal is to export the dataset into a social network software for my
thesis.
Thanks,
No.5 | | 1547 bytes |
| 
Hi,
If you want to round your value to the specified no. of digits, use round().
Else if you want to extract the values without rounding use truncate().
mysql select round(blustat,2) from parts; [the value will get rounded to
the nearest decimal]
or
mysql select truncate (blustat,2) from parts; [no rounding, simply
extract only the value of specified digits]
For More
Thanks,
ViSolve DB Team
Message
From: "Dimitar Vasilev" <dimitar.vassilev (AT) gmail (DOT) com>
To: <mysql (AT) lists (DOT) mysql.com>
Sent: Thursday, February 01, 2007 1:40 AM
Subject: rounding digits after decimal sign
Hello,
Can anyone point me to a section of manual or link how to reduce digits
after
a decimal sign?
I have a table
mysqldesc part;
| Field | Type | Null | Key | Default | Extra |
| kod | varchar(255) | YES | | NULL | |
| bulstat | double(15,5) | YES | MUL | NULL | |
| Land | varchar(3) | YES | MUL | NULL | |
| ID | varchar(15) | YES | MUL | NULL | |
| IME | varchar(100) | YES | MUL | NULL | |
| VALUE | double(15,5) | YES | | NULL | |
| CNT | smallint(5) | YES | | NULL | |
| Date | datetime | YES | | NULL | |
and in bulstat column i have digits like 831690750.00000
which i would like round to the last whole digit.
Also could someone give a hint how to recode digits in order to anonymize
data.
My end goal is to export the dataset into a social network software for my
thesis.
Thanks,