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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing Leading Zeros

Status
Not open for further replies.

quietstormtw

Programmer
Sep 16, 2002
81
US
Hi All, I have a complete mess on my hands here.

I have been given a DB which has a column of values with leading zeros. To data is varying lengths...and also contain alpha characters.

After looking all over this forum...I could only find resolutions that solve for numeric values alone. Is there anyway to remove the leading zeros from the values that contain the alpha characters as well?

Example:

00001234
00569
0000DP8528469
00000951NW7

Any assistance is greatly appreciated!
 
Hi
Perhaps something like:
Code:
TheStr = "00000951NW7"

Do While Left(TheStr, 1) = 0
    TheStr = Mid(TheStr, 2)
Loop
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top