Support 805.461.7300
Sales
Our Technology. Your Success.

Transfer the last word in a field to another field

Description

This command will remove the last word in a field, and take that word and move it to its own field. The word "FromFieldname" in the command syntax below should be changed to the actual field name you want the last word removed from. Since the last word in FromFieldname will be moved in this command, make sure ToFieldname is changed to the actual name of the field that you will be moving the last word to. This command will not affect records that contain only one word in "fieldname". You can adjust the ">0" clause so the command only acts on records with "n" numbers of spaces. Example, change ">0" to "=3" and the command will only affect records that contain "3" spaces (examples shown below).

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 ToFieldname with ltrim(substr(FromFieldname,rat(" ",alltrim(FromFieldname)))), FromFieldname with left(FromFieldname,rat(" ",alltrim(FromFieldname))) for occur(" ",alltrim(FromFieldname))>0

In this command, ToFieldname represents the field that the last word will be filling into. FromFieldname is the field that contains the data that you'll be stripping.

After clicking RUN, the last word in the field will be stripped and placed in its own field.

« Back to Commands

I Just wanted to let you know we are in the Postal Fort Worth Texas Division and I received a call from someone in their office today wanting to ask me some questions. He asked if I understood about the changes with the move update starting for this month, then he asked me what software we were using. I explained to him that we have been using AccuZIP Software for the last 20 years and I thought you were the #1 in the United States. I told him that you were the only software displayed in the Postal Section of the Smithsonian Institute. He asked me if I had to manually change the updated addresses and I told him no that the Software did it for us and I could print a report showing the old address and the new address. He told me out of 32,000 names that were updated only 3 were wrong and he just wanted to call me to see what Software we were using. Thanks for such good software and support from your company over the past 20 years.
C.K., Wichita Falls, TX