Subject | Re: [firebird-support] Subselect causes slow query |
---|---|
Author | Helen Borrie |
Post date | 2005-09-10T02:17:11Z |
Sorry for being a bit premature on the Send button....
and d1.upc_hri is not null
>select/* need this too */
> di2.ID,
> di2.NDC,
> di2.FRMTD_NDC,
> di2.UPC_HRI,
> ....
>from
> MDDB_DRUGITEM di2
>where
> di2.NDC is not null
> and di2.UPC_HRI is not null /* eliminates all rows where one or the
>other is null */
> and exists (
> select
> d1.ndc
> from mddb_drugitem d1
> where d1.ndc = di2.NDC
and d1.upc_hri is not null
> group by 1./hb
> having count(d1.ndc) > 1)