Subject | Re: [firebird-support] left join |
---|---|
Author | Helen Borrie |
Post date | 2005-03-07T22:56:03Z |
At 08:44 PM 7/03/2005 +0000, you wrote:
be a straightforward left join.
select a.*, a2.*
from TABLE1 a
left join TABLE2 a2
on a."ID" = a2."ID_ref"
where a2."Val" = :Val
and a2."Pos" = :Pos
./hb
>have tried to make such query:"derived tables" - not until Fb 2 and not using quite your syntax.
>
>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?Well, the derived table seems redundant for this example, which appears to
be a straightforward left join.
select a.*, a2.*
from TABLE1 a
left join TABLE2 a2
on a."ID" = a2."ID_ref"
where a2."Val" = :Val
and a2."Pos" = :Pos
./hb