if exists( select 1 from Tb_Test where (BeginTime between '2012-5-2' and '2012-6-2') or(EndTime between '2012-5-2' and '2012-6-2') or('2012-6-2' between BeginTime and EndTime) or('2012-5-2' between BeginTime and EndTime) ) print '时间存在交叉'
if exists( select 1 from Tb_Test where (BeginTime between '2012-5-2' and '2012-6-2') or(EndTime between '2012-5-2' and '2012-6-2') or('2012-6-2' between BeginTime and EndTime) or('2012-5-2' between BeginTime and EndTime) ) print '时间存在交叉'