The list-subtract operator (-
) will produce a new list with the values of the left-side list that are not present in the right-side list. The values of the resulting list will be in the order they occurred in the original left-side list.
Duplicate result entries will be omitted.
({ 1, 2, 3 } - LIST(2, 3, 4))
produces a list of oneNumber
value:1
. See also:LIST()
({ "Bob", "Mary", "Bob", "Alice" } - { "Alice" })
produces a list ofText
values:Bob
,Mary
. In addition to the requested removal ofAlice
, note the duplicate occurrence ofBob
was also omitted from the result.
({ "Bob", "Mary", "Bob", "Alice" } - LIST())
produces a list ofText
values:Bob
,Mary
,Alice
. Note that the duplicate occurrence ofBob
was omitted from the result. Equivalent toUNIQUE({ "Bob", "Mary", "Bob", "Alice" })
. See also:UNIQUE()
({ "Bob", "Mary", "Bob", "Alice" } - { "Bob" })
produces a list of Text values:Mary
,Alice
. Note that althoughBob
only occurs once in the right-side list, both (all) occurrences ofBob
from the left-side list are removed in the result.
See also