--从2019年1月1日起,之后的十年日期列表 select to_date(ex.daylist,'yyyy-MM-dd') as 日期 from ( SELECT TO_CHAR(TO_DATE('2019-01-01', 'yyyy-MM-dd') + ROWNUM - 1, 'yyyyMMdd') as daylist FROM DUAL CONNECT BY ROWNUM <= trunc(to_date('2015-01-01', 'yyyy-MM-dd') - to_date('2005-01-01', 'yyyy-MM-dd')) + 1 ) ex where 1=1 ${if(len(startdate) == 0,""," and to_date(ex.daylist,'yyyy-MM-dd') >= '"+startdate+"'")} ${if(len(enddate) == 0,""," and to_date(ex.daylist,'yyyy-MM-dd') <= '"+enddate+"'")} order by to_date(ex.daylist,'yyyy-MM-dd') 语句问题应该在where里,不知道为什么就是没法做筛选 |
最佳回答 |
||||
0
|
|