Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

split string of numbers and remove leading zeros 1

Status
Not open for further replies.

tamnet

IS-IT--Management
Jun 2, 2005
31
GB
I have an access db that is linked to a legacy system, one of the fields in the table has a string of 24 numers such as

008902920089019703650197

every four numbers represent a measure in millimetres i.e. the above string would be

0089
0292
0089
0197
0365
0197

I have managed to split the string into 6 seperate fields using the Left and Mid functions but I also want to remove the leading zeros so that the numbers would end up so

89
292
89
197
365
197

I would like to know if this is even possible ??

Any help would be appreciated



Regards

Paul
 
Have a look at the Val (or Int) function:
Val(Left([yourField],4))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,
Thank You "VAL" worked fine

[2thumbsup][wink][2thumbsup][


Regards

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top