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
Re: [firebird-support] avoid query subselect
liviuslivius liviusliv...@poczta.onet.pl [firebird-support] Fri, 19 Jul 2019 04:34:25 -0700
- [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]