Subject:sequence distinct values Author:sreekanth mopuru Date:23 May 2007 12:02 PM
What is the best way to combine two sequences with distinct values into a sequence with distinct values in a xquery?
For eg.
let $a := (1, 2, 3 )
let $b := (3, 2, 5, 6)
result should be ( 1,2,3, 5, 6)
distinct-values ( ($a, $b)) would probably get the result, but I am looking if there is any other efficient way to take advantage of the fact the sequences being merged are already distinct.
Subject:sequence distinct values Author:(Deleted User) Date:23 May 2007 03:45 PM
Hi Sreekanth,
the two sequence are not distinct; also, distinct-values will not guarantee you the order you have written. But if you are looking for the fastest method, you should probably just benchmark the different methods and see which one suits best the XQuery engine you are using.