Join with multiple collections


How can I joint multiple collections in a Query?

i have tried:

for $a in input()/coll1,
for $b in input()/coll2
where $a/key = $b/key
return <result> { $a } </result>

but in the interactive manager i have too set a collection. It isnt possible to set 2 collections so this won’t work… Or am i doing something wrong?

Help will be appreciated :wink:



By the way… I’m working with tamino version :wink:

With Tamino Version 421 or later you can use the “collection()” function:

for $a in collection("col1")/document, $b in collection("col2")/document
where $a/key = $b/key
return <result> { $a } </result> 

sorry… Im using an older version… 4.1.1 any other ideas?

Thanks for your’e reply anyway. :wink: