select * from tbWareInfo where DATEEND between trunc(sysdate) and trunc(sysdate+1)
测试了一下,(trunc(tba.DATEEND-sysdate)*24返回一个负数,不符合第二个条件,所以无记录.改成下面语句试试: select distinct tba.wareinfoid from tbWareInfo tba where abs((trunc(tba.DATEEND-sysdate)*24))<=24 and abs((trunc(tba.DATEEND-sysdate)*24))>0;
select distinct tba.wareinfoid from tbWareInfo tba where abs((trunc(tba.DATEEND-sysdate)*24))<=24 and abs((trunc(tba.DATEEND-sysdate)*24))>0;
解决就结帐。谢谢各位。