UNION_OF_ANY is the flexible counterpart of
It creates a combined list of all the values and lists you provide in between a set of brackets, each separated by a comma.
If a value or list is not available:
UNION_OF_ANY simply ignores it and combines what is available.
UNION, before returning a result, will alert you to go back and provide the missing list and/or value.
A person in a case has lived in Germany, Switzerland, and Singapore. Being a fine, law abiding citizen, the person has not been banned from any countries.
The above expression will result in the list
[de, ch, sg]
UNION_OF_ANY is used, the request for ‘countries banned from’ is ignored, because there are none for this person.
Would you have used
UNION instead, the system would have alerted you to provide one or more countries the person is banned from before giving you the combined list.