Re: [sqlite] left join using where clause instead of using on clause

2009-10-05 Thread Jay A. Kreibich
On Mon, Oct 05, 2009 at 02:02:51PM +0200, Tim Lind scratched on the wall: > Hi > > I have a query that is using a left join, with a where clause, and the > results I expect are not returned because the one table doesn't have a > related record. > If I put the constraint in the on clause of the

Re: [sqlite] left join using where clause instead of using on clause

2009-10-05 Thread Simon Slavin
On 5 Oct 2009, at 1:02pm, Tim Lind wrote: > I have a query that is using a left join, with a where clause, and the > results I expect are not returned because the one table doesn't have a > related record. > If I put the constraint in the on clause of the query instead, the > expected results are

Re: [sqlite] left join using where clause instead of using on clause

2009-10-05 Thread Igor Tandetnik
Tim Lind wrote: > I have a query that is using a left join, with a where clause, and the > results I expect are not returned because the one table doesn't have a > related record. > If I put the constraint in the on clause of the query instead, the > expected results are returned with the null reco

Re: [sqlite] left join using where clause instead of using on clause

2009-10-05 Thread Pavel Ivanov
> That said, constraints go in the WHERE clause. JOIN conditions go in > the JOIN clause. Not necessarily. My personal thinking was that it doesn't matter where you put your join conditions - in WHERE clause or in JOIN clause. And I've always put these condition into WHERE clause because it was ea

Re: [sqlite] left join using where clause instead of using on clause

2009-10-05 Thread P Kishor
On Mon, Oct 5, 2009 at 7:02 AM, Tim Lind wrote: > Hi > > I have a query that is using a left join, with a where clause, and the > results I expect are not returned because the one table doesn't have a > related record. > If I put the constraint in the on clause of the query instead, the > expected

[sqlite] left join using where clause instead of using on clause

2009-10-05 Thread Tim Lind
Hi I have a query that is using a left join, with a where clause, and the results I expect are not returned because the one table doesn't have a related record. If I put the constraint in the on clause of the query instead, the expected results are returned with the null record of the relate