Oracle/SQL: Generate range of dates

PHOTO EMBED

Mon Aug 29 2022 14:43:52 GMT+0000 (Coordinated Universal Time)

Saved by @marcopinero #sql

SELECT TRUNC (SYSDATE - ROWNUM) dt
  FROM DUAL CONNECT BY ROWNUM < :ndates;
  
/* from now on */
SELECT TRUNC (SYSDATE + ROWNUM - 2) dt
  FROM DUAL CONNECT BY ROWNUM < 100
content_copyCOPY