Stuart McLachlan
stuart at lexacorp.com.pg
Thu Oct 30 16:26:11 CST 2003
On 30 Oct 2003 at 16:54, Oleg_123 at xuppa.com wrote:
> Hi Group
>
> I need to update a column by setting all fields that are 5 characters long
> to equal the same values pluls "0" at the beginning. How do I specify that
> in WHERE ?
>
>
> UPDATE GPM_1
> SET [Org Level 2 Code]= "0" & [Org Level 2 Code]
> WHERE
>
LEN([Org Level 2 Code]) = 5
or if you also have 2,3 and 4 character long entries, you can pad
them all in one hit by using
UPDATE GPM_1
SET [Org Level 2 Code]= RIGHT("000000" & [Org Level 2 Code],6)
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System
Support.