Sorting SQL query results in Java

Posted by Manu on Stack Overflow See other posts from Stack Overflow or by Manu
Published on 2010-05-13T08:15:06Z Indexed on 2010/05/13 8:24 UTC
Read the original article Hit count: 216

Filed under:
|

Firstly my apologies for putting some large text here.

Below is the result by executing SQL query in Java but I want it to short it out using timestamp.

For eg. TimeStamp in the below 1st line text is - 040501(HH:mm:ss) (like wise all data contains timestamp) (Sorting should be done by using timestamp parameters) (Each line given below is single row from database)

12010051104050131331GZM4         7000000           1    FCFR

120100511040501912828MP2        11590000           0    NOTY

120100511040501312938VF7          366140   .96808795    FGPC

120100511040501912828KA7         6580000           0    NOTY

120100511040501912828JH4          490000           0    NOTY

120100511160528912810PV4        83227500     1.03581    TRIB

120100511160538912795W31               0           1    BILL

120100511160540912828MP2       455784400           0    NOTY

120100511160545912795W31               0           1    BILL

  220100511 040501         2101000

  220100511 040501        51037707

  220100511 040502          700149

  220100511 040502         4289000

  220100511 060514        71616600

  220100511 060514       722453500

the result i would expect is...

 12010051104050131331GZM4         7000000           1    FCFR

 120100511040501912828MP2        11590000           0    NOTY

 120100511040501312938VF7          366140   .96808795    FGPC

 120100511040501912828MP2        11590000           0    NOTY

 120100511040501912828JH4          490000           0    NOTY

  20100511040501         2101000

  20100511040501        51037707

  20100511040502         4289000

  20100511040502          700149

  20100511060514       722453500

  20100511060514        71616600

  20100511160528912810PV4        83227500     1.03581    TRIB

  20100511160538912795W31               0           1    BILL

  20100511160540912828MP2       455784400           0    NOTY

  20100511160545912795W31               0           1    BILL

Please help me out guys. i am fighting for this very long time. Thanks for your help in advance.

© Stack Overflow or respective owner

Related posts about java

Related posts about sql