Subject | Re: [firebird-support] Re: left join |
---|---|
Author | Ann W. Harrison |
Post date | 2005-03-08T18:03:47Z |
Gediminas wrote:
from table1 a
left join table2 b on (a.id = b.id_ref and
b.Val = :Val and
b.Pos = :Pos
Regards,
Ann
>select a.Nam, b.Pho
> 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?
from table1 a
left join table2 b on (a.id = b.id_ref and
b.Val = :Val and
b.Pos = :Pos
Regards,
Ann