splitting a number

  • Thread starter Thread starter ChrisS
  • Start date Start date
C

ChrisS

Hello...

if I have a column that has numbers such as

1234567

in one cell.....

is there a way to separate the last two digits into
another column? so it would be

12345
67
thanks
 
Use an Update query (Update on Query menu in query design view) to populate
the new field.

Use Right() to parse the right 2 characters.

To remove the last 2 digits from the field, use Left().
If the number of digits varies, use Len([MyField]) - 2 to get all but the
last 2 digits.
 
Maybe in a query you so something like
I forgot if you can use left and right.
But it would be something like

Select Left(numcol,len(numcol)-2) as col1, right(numcol,2) as col2 from ...
(e-mail address removed)
 
If the Field is Numeric, use a Query with the SQL String:

UPDATE [YourTable]
SET [CurrentField] = [CurrentField] \ 100,
[OtherField] = [CurrentField] MOD 100
 
Back
Top