Thanks everybody

Ravi's syntax worked and I'm on my way to have a nice weekend!:)

cheers

Liana



-----Original Message-----
From: Ravi Raman [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 4:39 PM
To: Liana Wiehahn; [EMAIL PROTECTED]
Subject: RE: Manipulation of data - batch processing!


hi.

update Erf set PortionNumber = CONCAT('0', PortionNumber) where
LENGTH(PortionNumber) = 4;
update Erf set PortionNumber = CONCAT('00', PortionNumber) where
LENGTH(PortionNumber) = 3;
update Erf set PortionNumber = CONCAT('000', PortionNumber) where
LENGTH(PortionNumber) = 2;
update Erf set PortionNumber = CONCAT('0000', PortionNumber) where
LENGTH(PortionNumber) = 1;

have a nice weekend!

-ravi.

-----Original Message-----
From: Liana Wiehahn [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 9:13 AM
To: [EMAIL PROTECTED]
Subject: Manipulation of data - batch processing!



Hi

I've got the following:

Table: Erf
Column Name : PortionNumber
DataType:  varchar(5)
Records: 39000

The values of these records are all numbers that starts at 0 and ends at
200.

I would like to insert one or more '0', infront of all the numbers to make
sure that the length of each record are 5 numbers.

I know how to update a single record, but obviously 39000 wouldn't allow me
to have a weekend :)

Liana
[EMAIL PROTECTED]



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to