Subject | Re: [ib-support] Getting Null Values on Inner Join |
---|---|
Author | Helen Borrie |
Post date | 2001-10-29T02:22:02Z |
At 01:50 PM 29-10-01 +1300, Colin wrote:
If you are getting "joins on nulls" then I would guess that either
(1) your application is not passing nulls to the database, but zero-equivalents (zero for numerics and/or empty strings for character types); or
(2) a trigger is writing zero-equivalents when nulls are encountered in the input stream for your inserts.
regards,
Helen
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hi all,No, you are correct.
>
>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???
>
If you are getting "joins on nulls" then I would guess that either
(1) your application is not passing nulls to the database, but zero-equivalents (zero for numerics and/or empty strings for character types); or
(2) a trigger is writing zero-equivalents when nulls are encountered in the input stream for your inserts.
regards,
Helen
>---------------All for Open and Open for All
>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.
>######################################################################
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________