und up.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 18, 2005 10:00 AM
To: Jerry Swanson
Cc: mysql@lists.mysql.com
Subject: Re: varchar(10) to decimal
Hi,
if varchar represents decimal(6,x) where x>2, it's truncated. Else, it
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 18, 2005 10:00 AM
To: Jerry Swanson
Cc: mysql@lists.mysql.com
Subject: Re: varchar(10) to decimal
Hi,
if varchar represents decimal(6,x) where x>2, it's truncated. Else, it's
converted :
mysql> create table dcml (a
Hi,
if varchar represents decimal(6,x) where x>2, it's truncated. Else, it's
converted :
mysql> create table dcml (a varchar(10));
Query OK, 0 rows affected (0.24 sec)
mysql> insert into dcml values('16.00'),('16.25'),('16.125');
Query OK, 3 rows affected (0.05 sec)
Records: 3 Duplicates: 0 Wa
decimal(6,2)
On 5/18/05, Philippe Poelvoorde <[EMAIL PROTECTED]> wrote:
> Jerry Swanson wrote:
>
> > I need to change format from varchar(10) to decimal.
> > When I alter the table the data is trimmed.
> >
> > What I'm doing wrrong?
> >
> > TH
> >
>
> ALTER TABLE your_table MODIFY your_column do
Jerry Swanson wrote:
I need to change format from varchar(10) to decimal.
When I alter the table the data is trimmed.
What I'm doing wrrong?
TH
ALTER TABLE your_table MODIFY your_column double NOT NULL DEFAULT '0.0';
should normally work. What is the command you are doing and have you
example re
Hi,
to convert '16.00' to 16.00, you can use select '16.00'+0
mysql> select '16.00'+0;
+---+
| '16.00'+0 |
+---+
|16 |
+---+
1 row in set (0.08 sec)
for ur columns, select col+0 from tbl;
Mathias
Selon Jerry Swanson <[EMAIL PROTECTED]>:
> I need to change format