改为
AND a.udate between to_date('2018/03/26 00:00:00', 'yyyy/mm/dd HH24:MI:SS') and
to_date('2018/03/26 23:59:59', 'yyyy/mm/dd HH24:MI:SS')
或者
AND a.udate between to_date('2018/03/26', 'yyyy/mm/dd') and
to_date('2018/03/27', 'yyyy/mm/dd')
最好条件写成如下:
AND a.udate between to_date('2018/03/26 00:00:00', 'yyyy/mm/dd hh24:mi:ss') and
to_date('2018/03/26 00:23:59', 'yyyy/mm/dd hh24:mi:ss')
因为用between and 的日期与查询里面的没有匹配的。