REDUCE
The REDUCE command is used to reduce an isolation to its uniqueness, based on
specified criteria.
Syntax:
REDUCE/options
collection [tablename] fieldname ... fieldname
Notation standards Options Answers
Options:
X -Suppress
the command response
Y -Do
not alter the command answer cells
Answers:
Ctl.Ans1 -The
"reduced to" value
Ctl.Ans2 -The
original number of records
Ctl.Ans3 -Zero
Notes:
Suppose you want to send a mailing to your NEW YORK customers, but you don't
want to send more than one to a household.
First isolate the NY customers. Then eliminate any duplicate addresses using
the REDUCE command:
FIND
A CUSTOMERS WHERE STATE=NY
REDUCE
A CUSTOMERS STREET ZIP
All records that duplicate STREET and ZIP are now eliminated from the
collection. Now you can sort them by ZIP and print labels:
SORT
A CUSTOMERS BY ZIP
REPORT
A CUSTOMERS ACCORDING TO LABELS
If you want to see the duplicates, the following will do the job:
FIND
A CUSTOMERS WHERE STATE=NY
FIND
B CUSTOMERS WHERE A
REDUCE
A CUSTOMERS STREET ZIP
FIND
C CUSTOMERS WHERE A XOR B
First get the NY customers in both A and B, then reduce A to the unique addresses.
Now the A XOR B query isolates just the duplicates in C. That is, just the
records those were in B and not in A.
Copyright © 2019 , WhamTech, Inc. All rights reserved. This
document is provided for information purposes only and the contents hereof are
subject to change without notice. Names may be
trademarks of their respective owners.