SELECT ARRAY_SYMDIFF([1, 2], [1, 2, 4]) AS symm_diffn
Giving Invalid function ARRAY_SYMDIFFN. - at )
I am running the query in couchbase query tab
Is there any other way to get it??
result should => [4]
SELECT ARRAY_SYMDIFF([1, 2], [1, 2, 4]) AS symm_diffn
Giving Invalid function ARRAY_SYMDIFFN. - at )
I am running the query in couchbase query tab
Is there any other way to get it??
result should => [4]
In CB 4.6.0 and above
SELECT ARRAY_SYMDIFF([1, 2], [1, 2, 4]) ;
ARRAY_SYMDIFF – includes value when it appears only once.
ARRAY_SYMDIFFN – includes value when it appears odd number of times.
In Pre CB 4.6.0
SELECT ARRAY v FOR v IN ARRAY_DISTINCT(ARRAY_CONCAT( [ 1,2], [ 1,2,4])) WHEN v NOT IN ARRAY_INTERSECT([ 1,2], [ 1,2,4]) END;
Hi,
Thank you very much for a quick reply.
Perfect…
Let me try this…