Support 805.461.7300
Sales
Our Technology. Your Success.

Remove the Last Number from a field

Description

This command will remove the last word in a field only if the data in the field named "fieldname" ends with a number (see examples, below). The word "fieldname" in the command syntax below should be changed to the actual field name you want the last word removed from. This command will not effect records that contain only one word in "fieldname".

The Command At Work

Before Command After Command
Before running command
After running command

The Command

Copy this command, then paste it into the large text area of the command window:

Replace fieldname with left(fieldname,rat(" ",alltrim(fieldname))) for occur(" ",alltrim(fieldname))>0 and asc(right(alltrim(fieldname),1))>=48 and asc(right(alltrim(fieldname),1))<=57

After clicking RUN, the excess data (that ends with a number) will be stripped from the field of choice, helping clean up the field.

« Back to Commands

I’m influenced and impressed by the AccuZIP support personnel you have. We had setup issues on Friday and I was jamming things through my mail department and wanted to be able to use AccuTrace THAT DAY. It was important for my client. As a result I phoned support and spoke to a wonderfully pleasant woman who was extremely knowledgeable, polite and helpful. Donna whom I believe lived in Georgia was the representative. She is a treasure.
T.R., San Luis Obispo, CA