Dmitri Bichko wrote:
> I wish it were as easy as a join - the query is much simplified for the
> purpose of the example, in reality the subselect is more complicated and
> includes a GROUP BY (which, at least as far as I know, makes subqueries
> the only way of doing this).
>
> Thanks anway, guess I'll wait for 7.4 with this (and just split them up
> into two queries for the time being),
Did you try a correlated subquery using EXISTS? You can make that
subquery as complicated as you want. The semantics between IN and
EXISTS vary though in the prescence of NULLs.
SELECT blast_id
FROM genes
WHERE blast_batch_id = 2 AND EXISTS (
SELECT 1
FROM ll_out_mm
WHERE ll_out_mm.locusid = genes.locus_id AND
...
};
Mike Mascari
mascarm@mascari.com