Tech Support Guy banner
Status
Not open for further replies.
1 - 4 of 4 Posts

·
Registered
Joined
·
33 Posts
Discussion Starter · #1 ·
Hi,

I have a table with a text field (call it "NbrCounter") that holds data in the following format:

Number1
Number2
.
.
Number15
.
.
Number124
.
etc...

I'm wondering if there is a way to write an update query that would strip off the numbers on the right and put them into a new number column.

In Excel I would simply write a function like =RIGHT(E6,LEN(E6)-6) which would strip off 6 characters starting from the left, leaving just the numbers. Is there anything similar I can do in Access?

Thanks
 

·
Super Moderator
Joined
·
65,961 Posts
still have those functions and MID

mid = http://www.techonthenet.com/access/functions/string/mid.php
left = http://www.techonthenet.com/access/functions/string/left.php
right = http://www.techonthenet.com/access/functions/string/right.php
length = http://www.techonthenet.com/access/functions/string/len.php

so you should be able to do something the same
something like - dont have access in front of me

=mid([nbrcounter],7,len[nbrcounter]-6
so this should start at character 7 (the 1st part of the number and then take 6 away from the length of the string and so extract the number

sorry its not the exact syntax
 

·
Super Moderator
Joined
·
65,961 Posts
excellent - sorry i could type exact syntax - but glad it worked all ok
:up:
 
1 - 4 of 4 Posts
Status
Not open for further replies.
Top