Subject Re: [ib-support] Found possible bug on FB 1.0 build 821
Author Lele Gaifax
>>>>> On Thu, 19 Sep 2002 19:08:35 -0300, "Fernando Deola" <fernandodeola@...> said:

FD> I believe I've possibly found a strange bug. Look at this
FD> query: SELECT P.ID_PESSOA, F.NR_FONE FROM PESSOA P INNER JOIN
FD> FONE F ON (F.ID_PESSOA = P.ID_PESSOA AND F.NR_FONE NOT IN
FD> (SELECT SKIP 1 FF.NR_FONE FROM FONE FF WHERE FF.ID_PESSOA =
FD> P.ID_PESSOA))

I would not use the IN clause in such case, since it FB won't use
indexes to resolve the query when the elements are given by a
subquery.

I'd probably try something like

SELECT P.ID_PESSOA
, (SELECT FIRST 1 F.NR_FONE
FROM FONE F
WHERE F.ID_PESSOA = P.ID_PESSOA) NR_FONE
FROM PESSOA P

hth,

FD> -----Mensagem original----- De: Gerhard Knapp
FD> [mailto:prometheus@...] Enviada em: sexta-feira, 30 de
FD> agosto de 2002 17:21 Para: ib-support@yahoogroups.com Assunto:
FD> [ib-support] Slow connection - PROBLEM IS SOLVED, HURRA

Please, do your quoting in the right way (for example, consult
http://www.xs4all.nl/~hanb/documents/quotingguide.html), in particular
do not post a message as an unrelated followup to another thread.

thx,
bye, lele.
--
nickname: Lele Gaifax | Quando vivro' di quello che ho pensato ieri
real: Emanuele Gaifas | comincero' ad aver paura di chi mi copia.
email: lele@... | -- Fortunato Depero, 1929.