Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX - |
Contents
Index
![]() ![]() |
Part 1 The Basic for Developing Application | > Chapter 3 Data Search Methods | > 3.7 Extracting Aggregated Results | > 3.7.1 Grouping Search Results |
To group by multiple keys, specify the key specifications in the sort expression by separating them with commas. Each key specification can be specified as either a numeric or character string. When multiple key specifications are specified, XML documents that match all the key values will be handled as a single group. Up to eight key specifications can be specified.
The following explanation assumes that Documents A, B, C, below exist:
Document A
<doc> <basic date="2006/03/03"> : </basic> <detail> : <destination area="Adelaide">Head Office</destination> : </detail> : </doc> |
Document B
<doc> <basic date="2006/03/03"> : </basic> <detail> : <destination area="Adelaide">Head Office</destination> : </detail> : </doc> |
Document C
<doc> <basic date="2006/03/10"> : </basic> <detail> : <destination area="Adelaide">Head Office</destination> : </detail> : </doc> |
Example
The following example shows how to group documents according to the trip destination (destination) and the trip date (date):
/doc/detail/destination/text(),/doc/basic/@dateResult: Documents A and B are handled as one group, and document C is handled as another group.
Contents
Index
![]() ![]() |