下面这段SQL该怎么改呢,我这边老是报数据集配置错误 select name,if('a.zzrq<= to_date('${startdate} 23:59:59','yyyy-mm-dd,hh24:mi:ss') and a.ksrq <= to_date('2021-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss')','a.zzrq-to_date('2021-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss')','to_date('${startdate} 23:59:59','yyyy-mm-dd,hh24:mi:ss')-a.ksrq') from awhere a.sj>= to_date('2021-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss')and a.sj<= to_date('${startdate} 23:59:59','yyyy-mm-dd,hh24:mi:ss') |
最佳回答 |
||||
0
|
|