Subject | Re: [firebird-support] Outer Join Problem |
---|---|
Author | Ann W. Harrison |
Post date | 2004-11-26T19:08:13Z |
At 07:14 AM 11/26/2004, andrew_s_vaz wrote:
select n.UserId, N.Name, L.LendDate, L.BookId
from Names N
left outer join Lend L on
(L.UserId = N.UserId and L.BookId = 100);
The "new" join syntax is very procedural. Think of it as
being processed from the inside out. The "on" clauses
are processed first, the joins are done, then the where
clause is applied to the result set.
Regards,
Ann
>I'm trying to do something slightly diferent. Given a tableTry
>with people's names and books lended (like in a Library) I want
>to make a list with all the names but only show a specified book.
>
>select N.UserId, N.Name, L.LendDate, L.BookId
>
>from Names N
> left outer Join Lend L on (L.UserId = N.UserId)
>Where L.BookId = 100
select n.UserId, N.Name, L.LendDate, L.BookId
from Names N
left outer join Lend L on
(L.UserId = N.UserId and L.BookId = 100);
The "new" join syntax is very procedural. Think of it as
being processed from the inside out. The "on" clauses
are processed first, the joins are done, then the where
clause is applied to the result set.
Regards,
Ann