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

Would you please pass along to the rest of the AccuZIP team how refreshing it is to have great support? I was an Accuzip customer for several years and left almost 2 years ago thinking the grass was greener on the Bulk Mailer side of the fence. BOY WAS I WRONG! It was one of the worse decisions I made in a long time and actually switched back before my subscription was up with them, paying for an entire year of their software without using it. Eric welcomed me back, and your team got us up and running in no time. The tech support with BCC which gobbled up Bulk Mailer was horrid at best. Very sterile and no personalities or willingness to help at all when you actually were able to talk with someone.
C.H., Sandusky, OH