Hi,
 
i suppose this one is much faster
 
SELECT P.ID
, CASE WHEN EXISTS(SELECT * FROM  CHILD C WHERE C.ID_PARENT=P.ID AND 
C.MYFIELD=3)
 
) 
THEN 1 ELSE 0 END AS ISDATA
  FROM PARENT P
............
INNER JOIN TABLE3 T3 ON P.ID=T3.....
INNER JOIN TABLE3 T4 ON P.ID=T4.....
...........
 
 
Regards,
Karol Biieniaszewski
  • [firebird-supp... 'Mr. John' mr_joh...@yahoo.com [firebird-support]
    • Re: [fire... liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
      • Re: [... 'Mr. John' mr_joh...@yahoo.com [firebird-support]

Reply via email to