34,838
社区成员




---加上top 100 percent
(select top 100 percent do.id, c.start_Time, c.ani, c.calling_Device, c.callee_Device, c.answer_Duration,
c.call_Type, c.ani_Area, c.undesktop_Notify_Missed_Call FROM Call_Master as c, Device_Info do
WHERE c.answer_Duration=0 AND do.apply_State=2 and c.call_Type in (1,3)
AND do.device = c.callee_Device and (do.device in ('8760') )
AND c.start_Time_Yy=2008 and c.start_Time_Mm=2 and c.start_Time_Dd=18
order by c.start_Time desc)
union
(
select top 100 percent di.id,b.start_Time, b.ani, b.calling_Device, b.callee_Device, b.answer_Duration,
b.call_Type, b.ani_Area, b.undesktop_Notify_Missed_Call FROM Call_detail as b, Device_Info di
WHERE b.answer_Duration=0 AND di.apply_State=2 and b.call_Type in (1,3)
AND di.device = c.callee_Device and (di.device in ('8760') )
AND b.start_Time_Yy=2008 and b.start_Time_Mm=2 and b.start_Time_Dd=18
order by b.start_Time desc
)
select do.id, c.start_Time as st, c.ani, c.calling_Device, c.callee_Device, c.answer_Duration,
c.call_Type, c.ani_Area, c.undesktop_Notify_Missed_Call
FROM Call_Master as c, Device_Info do
WHERE c.answer_Duration=0 AND do.apply_State=2 and c.call_Type in (1,3)
AND do.device = c.callee_Device and (do.device in ('8760') )
AND c.start_Time_Yy=2008 and c.start_Time_Mm=2 and c.start_Time_Dd=18
union
select di.id,b.start_Time as st, b.ani, b.calling_Device, b.callee_Device, b.answer_Duration,
b.call_Type, b.ani_Area, b.undesktop_Notify_Missed_Call
FROM Call_detail as b, Device_Info di
WHERE b.answer_Duration=0 AND di.apply_State=2 and b.call_Type in (1,3)
AND di.device = c.callee_Device and (di.device in ('8760') )
AND b.start_Time_Yy=2008 and b.start_Time_Mm=2 and b.start_Time_Dd=18
order by st desc