Subject Re: left join
Author Gediminas
send bad example, should be:

select a."Nam" , b."Pho"
from TABLE1 a
left join (select * from TABLE2 a2 where a2."Val"=:Val and
a2."Pos"=:Pos) b
on a."ID"=b."ID_ref"

where ID-PK in Table1, ID_ref-FK in Table2

How to rewrite this query?

--- In firebird-support@yahoogroups.com, "unordained"
<unordained_00@c...> wrote:
> select a.* from TABLE1 a left join TABLE2 b on b."Val" = :Val and
b."Pos" = :Pos and a."ID" =
> b."ID_ref";
>
> ---------- Original Message -----------
> > have tried to make such query:
> >
> > select * from TABLE1 a
> > left join ( select * from TABLE2 a2 where a2."Val" = :Val and a2."Pos"
> > = :Pos ) b
> > on a."ID" = b."ID_ref"
> >
> > it seems, that FB1.5 don't support such subqueries (memory tables),
> > how to rewrite query to get working FB1.5 query?