Subject | Re: Interesting results with joined views (WI-V6.2.972, fb1.0.3) |
---|---|
Author | Svein Erling Tysvær |
Post date | 2005-03-11T12:12:12Z |
Hi again, Semp!
changes? If so, the last outer join was replaced by an inner join.
view at all and then use two outer joins rather than one outer join
and one inner join to reach t_b?
paragraph is correct. Hopefully some of the female gurus, mr Bamsemums
or some Fb expert who is more of the quiet type will either tell the
reason or that you should report it as an error...
everybody "you/him/her" and used my spare brain capasity remembering
what my wife told me not to forget ;o)
Set
> Hi,Svein Erling.Yes, that should be it.
>
> Thanks for replying.
>
> I guess you meant:
>
> create view v_a (
> id,
> mgrid,
> SempTestUniqueName
> )
> as
> select a.id, a.mgrid, b.empid
> from t_a a
> left outer join t_c c on a.mgrid = c.mgrid
> join t_b b on b.empid = c.empid
> ;
> Unfortunately, the results stay the same.Didn't you just say that the results stayed the same with the above
>
> Playing around a bit with different view approaches and types of
> joins, it seems the OUTER join is the problem.
>
> If I either create the view with the last join as "join" and
> not "left outer join", the view works as expected.
changes? If so, the last outer join was replaced by an inner join.
> So, the fact is that as long as I want to use (left) outer joins, IMaybe it could be because you do not select anything from t_c in the
> have to inner join the result with a table whos fields I may not
> even need, in order for the view to return the correct values?
view at all and then use two outer joins rather than one outer join
and one inner join to reach t_b?
> Sounds buggy to me.Agreed, though there may be a reason if what I wrote in the last
paragraph is correct. Hopefully some of the female gurus, mr Bamsemums
or some Fb expert who is more of the quiet type will either tell the
reason or that you should report it as an error...
> The fun part is that with the broken view, I get results like:If only names had been that easy. Then I could just have called
>
> select mgrid, empid from v_a where id = 1;
> MGRID EMPID
> ============ ============
>
> 871172 10000
>
> select mgrid, empid from v_a where id = 1 and empid is null;
> MGRID EMPID
> ============ ============
>
> 871172 <null>
>
> "What's your name, girl?"
> "Whatever you want it to be!"
everybody "you/him/her" and used my spare brain capasity remembering
what my wife told me not to forget ;o)
Set