Hi Bernd,

I think you should be able to use a column type such as

field FLOAT(10, 4) ZEROFILL NOT NULL

You might want to change the numbers 10 and 4 depending on how many
leading/trailing 0s you want.


Matt


----- Original Message -----
From: "Bernd Tannenbaum"
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 06, 2003 7:29 AM
Subject: Re: keep leading 000 -solved


Am Donnerstag, 6. November 2003 13:14 schrieb Bernd Tannenbaum:
> Hi all,
> only small problem here (me hopes).
> I update a field with a value that is stored in a bash-variable.
> The value in the variable ($dsvar2) is like "000012.0000".
> So what i want is to keep the leading and trailing "0" in the value.
>
> in the bash-scipt:
> /mysql -e "UPDATE table
>   SET field=$dsvar2 WHERE id=$i" db --password=xx;

Ok, my mistake.....
Set field='$dsvar2'

This way the string is written completely, "Text" as field type works.

Thx,
Bernd


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to