求教:如何做以下查询?
表 table
numb meet_date begin_time end_time meet_name
1 2007-5-1 9:00 12:00 meet1
2 2007-5-1 12:00 17:00 meet2
3 2007-5-2 9:00 12:00 meet3
4 2007-5-2 12:00 17:00 meet4
如何实现下面结果
meet_date morning afternoon
2007-5-1 meet1 meet2
2007-5-2 meet3 meet4
即按日期,将上下午的会议分列显示。请问要如何实现?谢谢
------解决方案--------------------select a.meet_date,a.meet_name as morning,b.meet_name as afternoon
from
(
select meet_date,meet_name
from table
where begin_time= '9:00 '
) a,
(
select meet_date,meet_name
from table
where begin_time= '12:00 '
) b
where a.meet_date=b.meet_date