Re: LEFT/RIGHT Joins not working

2007-04-04 Thread murthy gandikota
Many thanks for your input. Looks like the older version of mysql, preceding 5.0 has some problems. I've to upgrade mysql now. :-( Thanks again. Mogens Melander <[EMAIL PROTECTED]> wrote: Well, trying your example gives me the expected result. select cust.ssn, disposition.disposition, so

Re: LEFT/RIGHT Joins not working

2007-04-03 Thread Mogens Melander
Well, trying your example gives me the expected result. select cust.ssn, disposition.disposition, source.source from cust LEFT JOIN source ON (cust.source=source.id) LEFT JOIN disposition ON (cust.disposition=disposition.id); '123456789', 'dispo2', 'source1' '123456780', 'dispo1', 'source2' '1234

Re: LEFT/RIGHT Joins not working

2007-04-03 Thread murthy gandikota
Hi Mike Thanks for your input. I read the page before and it caused more confusion. May be an example would clarify this: create table `cust` (`ssn` varchar(10), `source` int(3) , `disposition` int(3)); insert into cust (ssn, source, disposition) values ('123456789', 1, 2); insert i

Re: LEFT/RIGHT Joins not working

2007-04-03 Thread Michael Dykman
a left join and a right join are 2 very distinct things... It is not clear from your text what it is you exactly are going for here but I doubt that applying either LEFT or RIGHT to ALL of your (many) joins is going to give it to you. You need to stop and examine the relationships between the t

LEFT/RIGHT Joins not working

2007-04-03 Thread murthy gandikota
I tried the following 2 SQL's and the results are less than satisfactory. The RIGHT join does not show where disposition is NULL. The LEFT join shows dispositions as NULL where they shouldn't be. Also the LEFT join generates more dupes. Any way to fix this? select cust.first as FIRST, cust