2022-02-14

create a calendar in pl/sql

https://stackoverflow.com/questions/8374959/how-to-populate-calendar-table-in-oracle


 with calendar as (

        select to_date('01.01.2022','DD.MM.YYYY') + rownum - 1 as day

        from dual

        connect by rownum < to_date('01.02.2022','DD.MM.YYYY') - to_date('01.01.2022','DD.MM.YYYY')

    )

select rownum as "S.No", to_char(day,'dd.mm.yyyy') as "Cal_Dt", to_char(day,'day') as "DayName"

from calendar ;

Niciun comentariu:

Trimiteți un comentariu