Support 805.461.7300
Sales 800.233.0555
Our Technology. Your Success.

Remove last word from a field

Description

This command will remove the last word in a field. 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 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 fieldname with left(fieldname,rat(" ",alltrim(fieldname))) for occur(" ",alltrim(fieldname))>0

After clicking RUN, the excess data will be stripped from the field of choice, helping clean up the field.

« Back to Commands

"I recently ended probably the most helpful chat ever with your employee Aurora Crouch! She was so extremely thorough and made sure that the install and setup of Accuzip was ready to go. She was also so patient and polite as I fumbled around trying to remember how a PC works! I honestly can't say enough about how amazing and helpful and kind she was! I appreciate her help so very much, she is a great employee and makes it so easy for people like me (who have no idea what they are doing) to get things set up as they need to be. Thank you so much for all of your help and for having someone like Aurora on staff, she is literally a godsend!"
C.C., Savannah, GA