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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL question

Re: SQL question

From: Jason Salter <jason_at_seahorseNOSPAM.demon.co.uk>
Date: Thu, 14 Oct 1999 13:27:49 +0100
Message-ID: <7ssFOLwqTrVCC+JCM6nPSmO=aTIP@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 tt)  group by SMM

Jason. Received on Thu Oct 14 1999 - 07:27:49 CDT

Original text of this message

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