This content has been marked as final. Show 3 replies
how will i know which null values from end_call_date_time are originally null in b table and wich null values are because subscr_no 8 and 9 do not appear in b table?
You'll know if you check b.subscr_no - if it is null, there wasn't a match. If it is not null, you have an originally-null end date.
972166 wrote:When you say
... let's say i'l perform a left join like this:
from b left join a
now, notice that the relationship between a and b is 1 to many and subscr_no 8 and 9 appear in a table do not appear in b table.
notice that b table contain null values for end_call_date_time field.
in the joined table, how will i know which null values from end_call_date_time are originally null in b table and wich null values are because subscr_no 8 and 9 do not appear in b table?
Then all the columns that are supposed to come from b will really show what's in b. If the output for b.end_call_date_time is NULL, you can be certain that there is a NULL in the table. It's only values from table a that could appear as NULL for the two different reasons you mentioned.
FROM b LEFT JOIN a ...
As the others have already said, a.subscr_no (in this example) will not be NULL if the ourput row represents a match.
user648773 wrote:This is a great idea if the outer join goes like this:
from a -- not b left join b -- not a on (b.subscr_no=a.subscr_no)