Subject | Getting Null Values on Inner Join |
---|---|
Author | C Fraser |
Post date | 2001-10-29T00:50:05Z |
Hi all,
Just a query on a query, I have shown the simplified query I have run
below... The result that gets back is a little different than
expected... Some rows for the first column return NULL. Table2.Table1Id
is allowed to be null, but I thought that the INNER JOIN would stop the
return of NULL fields...
Am I wrong in this regard???
Just curious.
Regards
Colin
---------------
SELECT
Table1.Id,
Table2.SomeInfo
From Table2
INNER JOIN Table1 ON Table1.Id = Table2.Table1Id
I have also used the following From clause (just in case) and get the
same result.
FROM Table1
INNER JOIN Table2 ON Table1.Id = Table2.Table1Id
######################################################################
Attention:
The information in this email and in any attachments is confidential.
If you are not the intended recipient then please do not distribute,
copy or use this information. Please notify us immediately by return
email and then delete the message from your computer.
Any views or opinions presented are solely those of the author.
######################################################################
Just a query on a query, I have shown the simplified query I have run
below... The result that gets back is a little different than
expected... Some rows for the first column return NULL. Table2.Table1Id
is allowed to be null, but I thought that the INNER JOIN would stop the
return of NULL fields...
Am I wrong in this regard???
Just curious.
Regards
Colin
---------------
SELECT
Table1.Id,
Table2.SomeInfo
From Table2
INNER JOIN Table1 ON Table1.Id = Table2.Table1Id
I have also used the following From clause (just in case) and get the
same result.
FROM Table1
INNER JOIN Table2 ON Table1.Id = Table2.Table1Id
######################################################################
Attention:
The information in this email and in any attachments is confidential.
If you are not the intended recipient then please do not distribute,
copy or use this information. Please notify us immediately by return
email and then delete the message from your computer.
Any views or opinions presented are solely those of the author.
######################################################################