Author |
Message
|
RAJESHRAMAKRISHNAN |
Posted: Tue Sep 07, 2004 3:27 am Post subject: Sorting of XML elements based on Date. |
|
|
Voyager
Joined: 01 May 2004 Posts: 96
|
I have a XML doc like this
<root>
<Tag>
<startDate>2004-08-09T00:00:00</startDate>
<Tag>
<Tag>
<startDate>2004-07-08T00:00:00</startDate>
<Tag>
<Tag>
<startDate>2004-06-08T00:00:00</startDate>
<Tag>
</root>
Tag can accur many times
Now I want to split this message as .
Message1:
<root>
<Tag>
<startDate>2004-06-08T00:00:00</startDate>
<Tag>
</root>
Message2:
<root>
<Tag>
<startDate>2004-07-08T00:00:00</startDate>
<Tag>
</root>
Message3:
<root>
<Tag>
<startDate>2004-08-09T00:00:00</startDate>
<Tag>
</root>
Please note that the order of the message split is based on the startDate. Is it possible to do this using Select ? or do we need to sort this manually.
Thanks
Rajesh |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Sep 07, 2004 5:13 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
ESQL Select doesn't support ORDER BY clause. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
RAJESHRAMAKRISHNAN |
Posted: Wed Sep 08, 2004 5:01 am Post subject: |
|
|
Voyager
Joined: 01 May 2004 Posts: 96
|
Is it advisible to use the column function MIN or MAX to select the minimum or maximum startDate from XML . The time format is like this
2004-10-04T00:00:00. |
|
Back to top |
|
 |
PGoodhart |
Posted: Wed Sep 08, 2004 5:09 am Post subject: |
|
|
Master
Joined: 17 Jun 2004 Posts: 278 Location: Harrisburg PA
|
Why do you care what order the messages get put out in? You can build a fairly simple select and loop to accomplish what you need, if the order is just whatever is in the XML. _________________ Patrick Goodhart
MQ Admin/Web Developer/Consultant
WebSphere Application Server Admin |
|
Back to top |
|
 |
RAJESHRAMAKRISHNAN |
Posted: Wed Sep 08, 2004 7:45 am Post subject: |
|
|
Voyager
Joined: 01 May 2004 Posts: 96
|
The problem is messages should be in the order of the date. ie sequence is important. |
|
Back to top |
|
 |
JLRowe |
Posted: Wed Sep 08, 2004 8:10 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
|
Back to top |
|
 |
RAJESHRAMAKRISHNAN |
Posted: Tue Sep 21, 2004 3:21 am Post subject: |
|
|
Voyager
Joined: 01 May 2004 Posts: 96
|
Hi All,
Thanks very much. |
|
Back to top |
|
 |
|