Turn it into a cte and write the rest of your query under it:
with dateseq as
(
select trunc((:FromDate)+1)-rownum as date_val
from dual
connect by level <= ((:FromDate)-(:todate))+1)
)
select * from dateseq inner join ...
ps: simplified your query a bit- you don't need the subquery
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.