Oracle
 sql >> Database >  >> RDS >> Oracle

Come creare una tabella del calendario in Oracle

connect by level può essere utilizzata la clausola :

 select FromDate+level-1 "Date", Description "HolidayName"
   from holiday 
connect by level <=  ToDate - FromDate + 1
  group by FromDate+level-1, Description
  order by 1;

demo