wood burning stoves 2.0*
The moose likes Java in General and the fly likes Need help in getting the data. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Need help in getting the data." Watch "Need help in getting the data." New topic
Author

Need help in getting the data.

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
Hi List[],

By Query i am getting the data in following manner.For Particular Work Order.

Andhra Pradesh Programme Assistant Pragya Mishra
Andhra Pradesh Programme Assistant Pankaj
Andhra Pradesh Senior Programmer Sachin
Kashmir Programme Assistant Kapil Son
Kashmir Programme Shalini
But i want display the data in jsp page as.



1 Andhra Pradesh

Programmer Assistant Pragya Mishra
Programme Assistant Pankaj
Senior Programmer Sachin

2.
Kashmir
Programme Assistant Kapil Son
Programme Shalini

Please help me how i can do this using code.


Thanks
James Ward
Ranch Hand

Joined: Apr 27, 2003
Posts: 263
You need to provide additional information:
Do you want to display this in a JSP page?
The result of your query is in a ResultSet OR some java object (what kind)?
pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
Yes i want to display this in jsp .

and the result of my query is in ResultSet.

like this;


where invoices is my list.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

Option 1: store everything in a Map, with the employee name as the key and the titles as a List

Option 2: make sure the ResultSet is ordered on employee name, then keep track of the last employee and print when it has changed:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
 
subject: Need help in getting the data.
 
Similar Threads
Using JspWriter for Devloping Custom Tag
I have been to...
How many Hyderabadis are there in this community?
Disadvantage of being a vegetarian!
Place Association