create table #temp ( begin_dt datetime , end_dt datetime ) insert #temp select '2010-01-19 00:00:00.000', '2010-01-19 10:51:06.640' union all select '2010-01-18 10:51:06.640', '2010-01-18 11:51:06.640' union all select '2010-01-18 10:51:06.640', '2010-01-19 10:51:06.640' --殊 20100118 朱.. select * from #temp where 1=1 and begin_dt < '20100119' and end_dt >= '20100118'