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: cf <news_at_sitinfo.com>
Date: Mon, 3 Sep 2001 16:34:04 +0200
Message-ID: <9n0635$h9j$1@reader1.fr.uu.net>


Plus proprement.

set scan on
set serveroutput on
declare
D1 date;
D2 date;
begin
D1 := to_date('&D1','DD/MM/YYYY');
D2 := to_date('&D2','DD/MM/YYYY');
For l in 0..round(months_between( D2, D1)) Loop dbms_output.put_line(to_char(D1+(l*30),'YYYY MM')); End Loop;
End;
/

"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 - 09:34:04 CDT

Original text of this message

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