You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

DIFFERENCE


Determines the difference between 2 collections. Returns a collection containing all the items from collection1 that are not present in collection2.


Syntax

DIFFERENCE ( collection1 , collection2 )


Inputs
  • collection1, collection2 - Collections to be compared. These collections must be of the same base type.


Return type

  • collection


Venn diagram



Examples

ExpressionResultType
DIFFERENCE ( [ "a", "b", "c"] , [ "c", "d", "e" ] )[ "a" , "b" ]String (multivalued)
DIFFERENCE ( [ "nv" , "bv" ] , [ "NV" ] )[ "bv" ]String (multivalued)
DIFFERENCE ( 1 , 1 )[ ]Integer (multivalued)
DIFFERENCE( [ 1, 2 ], ? )?Integer (multivalued)

See also Collection function SYMMETRIC_DIFFERENCE