Joining Two Documents

Hi,

I have two tamino documets on containing fields userid,userdetails…

another document have fields userid and credit details . how i can join these two documents so that i can print both userdetails and credit details for a particular user.

regards sreeju

You want something like:

for $u in input()/user, $c in input()/credit
where $u/userid = $c/userid
return ...

can you please make it clear.

how i can return username from first document and credit amount from second document

ie how will be the return statement looks like… i got confused… so please

regards sreeju

It’s hard to say without knowing more about your schemas, but here’s something to get you started:

for $u in input()/user, $c in input()/credit
where $u/userid = $c/userid
return <my-result> { $u/userid, $c/credit-details } </my-result>