Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes how to compare row by row Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "how to compare row by row" Watch "how to compare row by row" New topic
Author

how to compare row by row

Baktha Elumalai
Greenhorn

Joined: Mar 13, 2010
Posts: 28
i have table Xydata i am getting gstime from the table



we want to compare the time hh, mm row by row (if the row is repeated delete the row else row is printed.
if row is repeated delete the one row
ouput


Final Output after compare row by row and delete duplicate row


i need this type of ouput

please help me if any body know the idea


Regards
Bakthavachalam E
Istvan Kovacs
Ranch Hand

Joined: May 06, 2010
Posts: 100
Why don't you filter out duplicates at the SQL level using SELECT DISTINCT?
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

Istvan Kovacs wrote:Why don't you filter out duplicates at the SQL level using SELECT DISTINCT?


This has been suggested on at least one of his many cross posts (at least 5 to my knowledge) of this topic.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to compare row by row
 
Similar Threads
How to Compare two Calendar Objects.
java.util.Date
how do i compare row by row
how to convert string into string array
how do get particular date of total time