Author |
Message
|
Android 23 |
Posted: Thu Oct 26, 2017 11:52 pm Post subject: Sorting data in Descending and Ascending order |
|
|
Apprentice
Joined: 27 Mar 2017 Posts: 38
|
Hi guys,
I have doubt in sorting data in descending & ascending order in iib.
Whereas, We can sort this in java through code. Does IIB can do that using codingg..
We dnt retreieve data from database.
Input data:
Quote: |
<students>
<std1>
<DOB>01-10-1994</DOB>
</std1>
<std2>
<DOB>10-10-1994</DOB>
</std2>
<std3>
<DOB>01-01-1990</DOB>
</std3>
<std4>
<DOB>08-10-1985</DOB>
</std4>
</students>
|
We get input data & generate data in desc & asce order.
Thanks & Regards.
Android 23. |
|
Back to top |
|
 |
sudheer7700 |
Posted: Fri Oct 27, 2017 1:12 am Post subject: |
|
|
Novice
Joined: 01 Feb 2017 Posts: 17
|
There is no function available for Sorting data in ESQL . 2 possible ways
In ESQL while loop and compare every data in xml tags and shuffle as per sorting order.
Calling external java, TreeSet with Comparator program. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 27, 2017 4:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Someone wrote a sort in ESQL and posted it to this forum a few years back. The search facility could probably turn it up for you. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Fri Oct 27, 2017 4:53 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
sudheer7700 wrote: |
In ESQL while loop and compare every data in xml tags and shuffle as per sorting order.. |
Don't use Bubble Sort, Quick Sort is simple to implement and much faster. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 27, 2017 4:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
Quick Sort is simple to implement and much faster. |
Isn't that what that guy did?
I wish I was motivated enough to look it up.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Fri Oct 27, 2017 5:10 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
http://www.mqseries.net/phpBB2/viewtopic.php?p=273722&highlight=#273722
Yes, this is quicksort in ESQL.
I am sure I coded it in REXX once with many fewer lines ... _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
|