1 2 3 4 5 6 7 8 9 10 11 12
| SELECT
trunc(sysdate) as DATE_COURANTE,
to_char(sysdate,'yyyy-mm') as MOIS_COURANT,
to_char(sysdate,'yyyy-IW') as SEMAINE_COURANT,
trunc(sysdate+2-to_number(decode(to_char(sysdate,'D'),'1','8',to_char(sysdate,'D')))) LUNDI_SEM_COURANTE,
trunc(sysdate-7) as "DATE-7",
trunc(sysdate-10) as "DATE-10",
to_char(add_months(sysdate,-1),'yyyy-mm') as "MOIS-1",
to_char(add_months(sysdate,-2),'yyyy-mm') as "MOIS-3",
to_char(add_months(sysdate,-5),'yyyy-mm') as "MOIS-6",
to_char(add_months(sysdate,-11),'yyyy-mm') as "MOIS-12"
from dual |
Partager