Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
This is my DB table with records

Stat_Time Stat_Date DataSource
09:00 23/08/2014 DBds
09:00 24/09/2014 xyz
09:00 20/10/2014 abc
10:00 10/02/2014 Ghu
11:00 05/02/2014 jjkl
12:00 06/08/2013 mno
13:00 15/06/2014 stu
I want to display the data in jsp page like following.

XML
<pre lang="java">
Stat_Time         Stat_Date         DataSource
                           23/08/2014          DBds
09:00                  24/09/2014          xyz
                           20/10/2014          abc
10:00                  10/02/2014          Ghu
11:00                  05/02/2014          jjkl
12:00                  06/08/2013         mno
13:00                  15/06/2014         stu</pre>



i.e. I don’t want to display duplicate values for multiple times in the “Stat_time” column, I want to display it only on time and rowspan to the rest of the column values .
Posted
Updated 2-Apr-14 21:42pm
v3

1 solution

you can use group by clause in your query first. then try some complex logic as well.
 
Share this answer
 
Comments
Telstra 9-Apr-14 11:13am    
Could u plz elaborate this by writing the query based on above table, becoz i am very poor in SQL queries
Shah Parth P 16-Apr-14 2:34am    
google it out for GROUP BY clause.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900