日期:2014-05-18 浏览次数:20517 次
SELECT * FROM TAB A WHERE EXISTS ( SELECT 1 FROM TAB WHERE DeviceID = A.DeviceID AND CreatedTime > A.CreatedTime AND CreatedTime <= DATEADD(MI,1,A.CreatedTime) )
------解决方案--------------------
Select SysOrderNo From ORDERDETAIL Group by SysOrderNo having Count(SysOrderNo)=2