Subject | Re: outer joins |
---|---|
Author | Ed Dressel |
Post date | 2004-08-04T03:16:55Z |
Just to clarify a bit further in the following result:
select count(*)
from ActionLog
where Action_DateTime > '02-AUG-2004'
the result is 19--those are the 19 records I want (one ActionLog
record has a client_id of null). If I use the following:
select count(*)
from ClientInfo CI
right outer join ActionLog AL on CI.Client_ID = AL.Client_ID
where Action_DateTime > '02-AUG-2004'
I get the same count of 19--perfect. If I add CompanyInfo (to get the
companies name)
select count(*)
from ClientInfo CI
right outer join ActionLog AL on CI.Client_ID = AL.Client_ID
right join CompanyInfo CO
on CI.Company_ID = CO.Company_ID
where Action_DateTime > '02-AUG-2004'
I only get 18 records--the ActionLog record with a null CLient_ID is
no longer included (confirmed by changing result set).
Can I get the Company name in the SQL?
Thanks
Ed Dressel
select count(*)
from ActionLog
where Action_DateTime > '02-AUG-2004'
the result is 19--those are the 19 records I want (one ActionLog
record has a client_id of null). If I use the following:
select count(*)
from ClientInfo CI
right outer join ActionLog AL on CI.Client_ID = AL.Client_ID
where Action_DateTime > '02-AUG-2004'
I get the same count of 19--perfect. If I add CompanyInfo (to get the
companies name)
select count(*)
from ClientInfo CI
right outer join ActionLog AL on CI.Client_ID = AL.Client_ID
right join CompanyInfo CO
on CI.Company_ID = CO.Company_ID
where Action_DateTime > '02-AUG-2004'
I only get 18 records--the ActionLog record with a null CLient_ID is
no longer included (confirmed by changing result set).
Can I get the Company name in the SQL?
Thanks
Ed Dressel