Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL question
Jason Salter <jason_at_seahorseNOSPAM.demon.co.uk> wrote in message
news:=9UFOAEj1admb7+xuapkmFJVkcwe_at_4ax.com...
> On Thu, 14 Oct 1999 12:22:58 +0200, "Rexx" <nebacar_nospam_at_eunet.yu>
> wrote:
>
> >HI,
> >
> >can I do in SQL next query
> >
> >I have table (eg.) T1 with two columns SMM and DATUM
> >
> >SMM DATUM
> >--------- -----------
> >1000 1-10-1997
> >1000 1-10-1998
> >1000 1-10-1999
> >
> >2000 1-10-1997
> >2000 1-10-1998
> >
> >3000 1-10-1997
> >3000 1-10-1998
> >3000 1-10-1999
> >
> >4000 1-10-1997
> >4000 1-10-1998
> >
> >I need to get "mising " records
> >
> >2000 1-10-1999
> >4000 1-10-1999
>
> Try this :-
>
> select SMM,add_months(max(DATUM),12)
> from T1
> having max(DATUM) < (select max(DATUM) from T1)
> group by SMM
However, it does not work.
Just replace the row (2000, 1-10-1997) to (2000, 1-10-1999)
or remove it, and run your statement again to see what's happened.
You will lose some rows.
Received on Fri Oct 15 1999 - 12:50:57 CDT
![]() |
![]() |