Re: [sqlite] Incorrect left join behavior?

2011-05-25 Thread Michael Stephenson
Makes sense. Thanks. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Wednesday, May 25, 2011 9:37 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Incorrect left join behavior? > I

Re: [sqlite] Incorrect left join behavior?

2011-05-25 Thread Pavel Ivanov
> I can use two left joins.  While writing the first left join, I discovered > that it is behaving like an inner join. > > select * > from test a >   left join test b on a.component = b.component > where a.machine = 'machine1' >   and b.machine = 'machine2'; By the WHERE condition you limit

[sqlite] Incorrect left join behavior?

2011-05-25 Thread Michael Stephenson
Hi, I have a table as below. Note that machine1 has 3 components (1-3), while machine2 has only 1 components (1). Machine Component Version machine1 component1 1 machine1 component2 1 machine1 component3 1 machine2 component1 1 create table test(Machine, Component,