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

We have been using the AccuZIP software for over seven years now. I believe that being an AccuZIP customer is one of the reasons for our success. Every time a question has arose, AccuZIP answered it completely and competently. When the post office did not have an answer for us AccuZIP did. If there was ever any conflicting info between the Post Office and AccuZIP, our AccuZIP customer service rep was always correct. We have experienced only excellent customer service. Let me make that clear not good customer service, excellent customer service.
C.M., Show Low, AZ