Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help in getting the data.

 
pankaj semwal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20546
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic