Outer Join - doing it first
From: Alireza Assadzadeh <aassadza_at_chat.carleton.ca>
Date: 1996/09/17
Message-ID: <323E34E4.76FD_at_chat.carleton.ca>#1/1
create view wa as
select
where a.id = b.id
select * from work_around
where b_id is NULL
Date: 1996/09/17
Message-ID: <323E34E4.76FD_at_chat.carleton.ca>#1/1
Hello,
This should give all the rows in table a that don't exist in table b. But it doesn't work because b.id is NULL condition is applied to b first and then the outer join is done.
A simple work around is:
create view wa as
select
a.id as a_id, a.name as a_name, b.id as b_id, b.account as b_account from a, outer b
where a.id = b.id
then use the this select:
select * from work_around
where b_id is NULL
All suggestions are greatly appreciated.
Best regards,
Alireza Assadzadeh
--Received on Tue Sep 17 1996 - 00:00:00 CEST