Subject | Re: [firebird-support] Select how to |
---|---|
Author | Lucas Franzen |
Post date | 2004-09-02T21:03:14Z |
sboydlns schrieb:
SELECT ... FROM table1 where table1_key IN (...)
with
SELECT ... FROM table1 where EXISTS (...)
I don't know a faster way than that.
Luc.
> Suppose I have:Have you considered replacing the
>
> table1 (table1_key varchar);
> table2 (table2_key varchar;
> table2_sequence_number integer;
> somefield : varchar);
>
> Is it possible to structure a SELECT statement that will retrieve all
> records from table1 such that COUNT(table2_sequence) WHERE table2_key
> = table1_key AND somefield = 'some value' is at most some arbirtrary
> value.
>
> I don't want to do a SELECT ... FROM table1 where table1_key IN (...)
SELECT ... FROM table1 where table1_key IN (...)
with
SELECT ... FROM table1 where EXISTS (...)
I don't know a faster way than that.
Luc.