Duplicate in sort key

At the end of the post is an example of my XML document.

I am trying to do an interdocument search as follows:

http://servername/tamino/databasename/ExposureReports?_xql=/rptdocument sortby (monitoringperiods/monitoringperiod/begindate)

and I get the following results.

<?xml version="1.0" encoding="iso-8859-1" ?>
- <ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“http://metalab.unc.edu/xql/”>
xql:query/rptdocument sortby (monitoringperiods/monitoringperiod/begindate)</xql:query>
- <ino:message ino:returnvalue=“8309”>
<ino:messagetext ino:code=“INOXIE8309”>Duplicate in sort key</ino:messagetext>
ino:messagelineWithin document with ino:id = 1 there is a sort key which consist of more than a single value</ino:messageline>
</ino:message>
</ino:response>

Is there a way to do this sort?

Thanks for any help.

Heather


<?xml version="1.0" encoding="iso-8859-1" ?>
- <ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“http://metalab.unc.edu/xql/”>
xql:query/rptdocument[@ino:id = 1]</xql:query>
- <ino:message ino:returnvalue=“0”>
ino:messagelineXQL Request processing</ino:messageline>
</ino:message>
- xql:result
-
true
show
true

false
009970
false
AHC
9700100004
20020617


2
false
S
PR 7502
RPT130
N1
-
C

D0001
RQR
-
-
20010101
20011231
1
2001
-
-
00801
STEADHAM SARAH


6
F
20020617
484907506
SSN
08/02/1976
<>F</>
-
-

-
10
13
10

-




-
M
M
M

-
263
274
265

-
PREVIOUS HISTORY ADDED

WHBODY
P
200202

9119
P
1
3
6
30





-
20020101
20020131
1
2002
-
-
00801
STEADHAM SARAH


1
F
20020617
484907506
SSN
08/02/1976
<>F</>
-
-

-
M
M
M

-




-




-
263
274
265

-
PREVIOUS HISTORY ADDED

WHBODY

200202

9123
P
1
1
1
31






-
-
0

ALEGENT BERGAN MERCY
MEDICAL CENTER/RADIOLOG
ATTN LISA GUBBELS
7500 MERCY ROAD
OMAHA NE 68124









-
M: MINIMAL REPORTING SERVICE OF 1 MREM
ELECTRONIC MEDIA TO FOLLOW THIS REPORT


</xql:result>
- <ino:message ino:returnvalue=“0”>
ino:messagelineXQL Request processed</ino:messageline>
</ino:message>
</ino:response>

Hi Heather,

Have a look at the following place in the documentation:

C:\Program Files\Software AG\Tamino\Tamino 3.1.1.4\Help\XQL\SORTBYCL.HTM

The problem is your rptdocument has more than one begindate element. So it is unclear which one to use as the sort criteria.

The easiest way is to just use the first occurence of begindate :-

http://servername/tamino/databasename/ExposureReports?_xql=/rptdocument sortby (monitoringperiods/monitoringperiod/begindate[1])

Cheers,
Puny Sen