Subject | Re: Left Outer Join assistance |
---|---|
Author | Adam |
Post date | 2004-12-09T04:55:53Z |
Nevermind, I must be going crazy.
select b.*
from tableb b
left join Tablea a
on (a.ID = b.TableaID)
where a.id = :idno
is a better way to do it.
Thanks anyway.
select b.*
from tableb b
left join Tablea a
on (a.ID = b.TableaID)
where a.id = :idno
is a better way to do it.
Thanks anyway.
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@y...> wrote:
>
> Hi all,
>
> I just came across something which I didn't anticipate, and was
> wondering why it behaves this way:
>
> select b.*
> from tablea a
> left outer join Tableb b
> on (a.ID = b.TableaID)
> where a.id = :idno
>
> Normally the query works fine, but when there are no matching idno
> records that match in table A, one record is still returned by this
> query (all the fields are null).
>
> I am trying to select all the records from tableb that when joined to
> tablea have the one IDNo.