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: HELP! How to check missing records

Re: HELP! How to check missing records

From: news.sovintel.ru <valera_at_ivkplcrd.msk.u>
Date: Mon, 22 Oct 2001 19:46:29 +0400
Message-ID: <9r1epp$17q9$1@josh.sovintel.ru>


Hi !

This task may be done in sql, but the computing clause is not quite simple and fast...

For ex. you can write something like that:

select
distinct
  t0."Driver-ID",
  t1."Trip-No"
from
  Trips t0,
 (select rownum "Trip-No" from user_tables where rownum < 10) t1 where
 not exists (select NULL from Trips t2 where t0."Driver-ID"=t2."Driver-ID" and t2."Trip-No"=t1."Trip-No")
/
Regards !
Valery.

"Ho" <kowho_at_singnet.com.sg> wrote in message news:9qt69u$bcm$1_at_clematis.singnet.com.sg...
> Hi ,
> I need to check the missing records (trip no.) of the following table:
>
> Driver-ID Vehicle-ID Trip No.
>
> ABC 1234 1
> 3
> 5
> 6
>
> BCD 2345 1
> 2
> 1 5
> ....
>
>
> For driver ABC mssing record are trip no 2 & 4, for driver BCD the
> missing records are 3 & 4.
>
> How to achieve this. Can it be done through SQL ?
>
> Many thanks for your help in advance.
>
>
>
Received on Mon Oct 22 2001 - 10:46:29 CDT

Original text of this message

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