Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Challenge ! Find a query doing...

Re: Challenge ! Find a query doing...

From: Laurence TERRAS <laurence.terras_at_digitech.fr>
Date: Mon, 3 Sep 2001 17:29:21 +0200
Message-ID: <9n07i5$a7r$1@d03.completel.fr>


en SQL si possible....

et on gagne tout plein de merci beaucoup! mais je crois que j'ai eu une réponse pas mal dans ma boite à mails :

v815> select to_char(add_months(trunc(to_date('22/09/2001','DD/MM/YYYY'),

  2                                  'MONTH'),
  3                            rownum-1),
  4                 'YYYY MM') "YYYY MM"
  5 from all_objects
  6 where rownum <=
trunc(months_between(to_date('15/05/2002','DD/MM/YYYY'),   7
trunc(to_date('22/09/2001','DD/MM/YYYY'),
  8                                             'MONTH')
  9                                       ))+1
 10 /

YYYY MM



2001 09
2001 10
2001 11
2001 12
2002 01
2002 02
2002 03
2002 04
2002 05

9 rows selected.

Thanks a lot Michel !!

"cf" <news_at_sitinfo.com> a écrit dans le message news: 9n05mn$h7d$1_at_reader1.fr.uu.net...
> On gagne quoi ?
>
> En SQL ou PL/SQL ?
>
> A+
>
> "Laurence TERRAS" <laurence.terras_at_digitech.fr> a écrit dans le message
> news: 9n0026$79j$1_at_d03.completel.fr...
> > Hello !
> >
> >
> > I'd like to fing a query wich be able to give Years and Months between 2
> > dates.
> > For example.
> > D1 = '22/09/2001' (DD/MM/YYYY)
> > D2 = '15/05/2002' (DD/MM/YYYY)
> >
> > results...
> >
> >
> >
>
>
Received on Mon Sep 03 2001 - 10:29:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US