0
在MS Access 2010中,我有一個名爲MyTable的具有以下字段的表:MS訪問「在」使用正在採取永遠
visit_id, client_id, associate_id, startTime, StopTime, VisitDate
我想找到不具有之間訂了參觀同夥Time1和Time2在某個日期。
我所選擇的方法是檢查其同夥不要在那些有間隔內訪問的查詢轉起來,如下列:
Select associate_id from
myTable
Where associate_id not in
(select associate_id from Mytable where visitStart <= Time2 AND VisitStop > Time1)
這永遠需要在MS Access 2010中運行,並不是一個可行的解決方案。 MS Access中有更高效的解決方案嗎?
非常感謝。使用「HAVING」解決了我的問題。 –