Compare address in all records and mark the longest

Build your list of AccuZIP6 commands by requesting commands and sharing commands with other users

Moderators: Chrissy, Steve, Terry, Donna, Dave, Eric, MartyH, Kristen, Geoff, Vince

Post Reply
User avatar
Eric
Moderator
Posts: 1909
Joined: Tue Sep 19, 2006 3:29 pm
Contact:

Compare address in all records and mark the longest

Post by Eric » Thu Oct 28, 2010 4:09 pm

The command below counts the number of characters in the field named Address and marks the record that has the largest number of characters.

Code: Select all

comFieldName="address"
SELECT MAX(LEN(allt(&comFieldName))) FROM (ALIAS()) INTO ARRAY _longest
LOCATE FOR LEN(allt(&comFieldName))=_longest(1)
REPLACE x WITH "X"
Chat with an AccuZIP6 technician weekdays from 7-4 PST with AccuZIP6 Live Online Support

deanmiller
Private
Posts: 5
Joined: Thu Dec 23, 2010 8:21 am

Compare address in all records and mark the longest update

Post by deanmiller » Thu Dec 23, 2010 8:59 am

This is a great tool for our inkjet specialist. It saves them a lot of time for proofing.

When I run this Command for address it will pick out the longest for all record whether they are deleted or not.

Is is possible to select only records that are not deleted?

more of a challenge,
Can a mark be placed in a designated field that is the longest. Say I have the field long_record. Can the letter x be placed in this field for the longest address.

Post Reply