Anthony
Anthony

Reputation: 1

XQUERY for EMC XDB separate for loops return in results

For this table results display top of the results. For this table results display bottom of the results.

I tried a few ways, a join. But the join takes alternates table1 record
table2 record
table1 record
table2 record

I need
table1 record
table2 record
table2 record
table2 record

{
for $an in /db/table1/row
where  $an/ACCOUNT = "something"
return $an
}
{
for $a in /db/table2/row
where  $a/PAT_ACCT_NBR = "something"
return $a
}
results

$an here
$a here.

Upvotes: 0

Views: 22

Answers (1)

wp78de
wp78de

Reputation: 18980

If I understand you correctly you could simply query the tables as needed and combine them to put them in the desired order:

let $table1 := //db/table1/row/ACCOUNT/[text() = 'something']
let $table2 := //db/table2/row/PAT_ACCT_NBR/[text() = 'something']
return ($table1, $table2)

The XPath part is just a suggestion; use whatever works for you.

Upvotes: 0

Related Questions