我想在jsp页面中显示数据,如下所示。 [英] I want to display the data in jsp page like following.
问题描述
这是我的DB表记录
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
我想在jsp页面中显示如下数据。
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.
<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>
即我不希望在Stat_time中多次显示重复值列,我想只在时间和行数上显示其余的列值。
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 .
推荐答案
您可以先在查询中使用group by子句。然后尝试一些复杂的逻辑。
you can use group by clause in your query first. then try some complex logic as well.
这篇关于我想在jsp页面中显示数据,如下所示。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!