S
Suma
I dont know xquery , so i was thinking someone in the forum will help
me out with this easy question
Suppose I have an instance document given below
<Root>
<Author Name='Alice' NumberOfBooks = '1'>
<Author Name='Bob' NumberOfBooks = '4'>
<Author Name='Collin' NumberOfBooks = '3'>
<Author Name='David' NumberOfBooks = '2'>
</Root>
Is there a way i can get the total number of books published by all
authors using a single xquery statement. (similiar to say SQL - select
sum(col) semantics)
What i DO NOT WANT to do is gettting all the nodes and doing the sum
at the client/my application. I would rather have the XML engine handle
the aggregation
Suma
me out with this easy question
Suppose I have an instance document given below
<Root>
<Author Name='Alice' NumberOfBooks = '1'>
<Author Name='Bob' NumberOfBooks = '4'>
<Author Name='Collin' NumberOfBooks = '3'>
<Author Name='David' NumberOfBooks = '2'>
</Root>
Is there a way i can get the total number of books published by all
authors using a single xquery statement. (similiar to say SQL - select
sum(col) semantics)
What i DO NOT WANT to do is gettting all the nodes and doing the sum
at the client/my application. I would rather have the XML engine handle
the aggregation
Suma