sql中没有STRT_TIME<='6'<=ENDX_TIME这种连等式,需要拆开用and连接
((stime>=6 and etime<=6) or(stime>=8 and etime<=8))
and ( STRT_TIME<='6'<=ENDX_TIME or STRT_TIME<='8'<=ENDX_TIME )
可以这样用么?
改成
and ((STRT_TIME<='6' and '6'<=ENDX_TIME) or (STRT_TIME<='8' and '8'<=ENDX_TIME))