Merges two member lists that are processed by another function. Duplicates (values found in both lists) are included only once in the merged list.


@MERGE (list1, list2)


The first list of member specifications to be merged.


The second list of member specifications to be merged.



Example 1

In the Sample Basic database,

@MERGE(@CHILDREN(Colas),@CHILDREN("Diet Drinks"));

returns Cola, Diet Cola, Caffeine Free Cola, Diet Root Beer, and Diet Cream Soda.

Diet Cola appears only once in the merged list, even though it is a child of both Colas and Diet Drinks.

Example 2

In this example, the @MERGE function is used with the @ISMBR function to increase the marketing budget for major markets and for western markets.

(IF (@ISMBR(@MERGE(@UDA(Market,"Major Market"),
Marketing = Marketing * 1.1;

This example produces the following report, which shows only the major markets in the East and all western markets:

                  Product     Year     Budget
New York                      6039              
Massachusetts                 1276              
Florida                       2530              

California                    7260              
Oregon                        2090              
Washington                    2772              
Utah                          1837              
Nevada                        4521              

The values prior to running the calculation script were:

New York        5490
Massachusetts   1160
Florida         2300

California      6600
Oregon          1900
Washington      2520
Utah            1670
Nevada          4110

See Also