getting part of data to populate new field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I a field named SIZE (text) , value examples are: 3 x 2-1/2, 1/2 x 2, 1-1/2 x
2-1/4.

now I want to get the first size before 'x' to write it to new field SIZE1
and the second size after the 'x' to SIZE2 field.

Can I do this using an update query.

thanks in advance
 
Try something along the lines of
UPDATE YourTable SET size1 = Left([size],InStr([size],'x')-2), size2 =
Mid([size],(InStr([size],'x')+2));

The above assumes that there is a space either side of the x

Hope This Helps
Gerald Stanley MCSD
 
Hi,

thanks so much, it solve my problem.


Gerald Stanley said:
Try something along the lines of
UPDATE YourTable SET size1 = Left([size],InStr([size],'x')-2), size2 =
Mid([size],(InStr([size],'x')+2));

The above assumes that there is a space either side of the x

Hope This Helps
Gerald Stanley MCSD

EMD said:
I a field named SIZE (text) , value examples are: 3 x 2-1/2, 1/2 x 2, 1-1/2 x
2-1/4.

now I want to get the first size before 'x' to write it to new field SIZE1
and the second size after the 'x' to SIZE2 field.

Can I do this using an update query.

thanks in advance
 
Back
Top