Archives of the TeradataForum
Message Posted: Wed, 24 Jul 2002 @ 17:46:13 GMT
I think it's working correctly. It's a bit confusing, but here's what I hink is happening.
Since the condition "T1.C1 IN (N,N,...)" is in the on clause of an outer join, it's not used to restrict the rows of T1(the outer join of course fails and resulting columns from T2 will be null, but the row from T1 will be returned nonetheless).
Your workaround should work just fine, but it could be simplified by just moving the "T1.C1 IN (N,N,...)" predicate into a "WHERE" clause in the original query.
The important thing to remember here is that, particularly in outer joins, there's (profound) difference between join conditions (ON clause contents) and row selection (WHERE clause contents).
I hope this helps.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|