Re: a LEFT JOIN problem

From: Thomas <iamkenzo(at)gmail(dot)com>
To: "Sam Mason" <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: a LEFT JOIN problem
Date: 2008-10-30 23:01:28
Message-ID: 55da14450810301601g7a836120pd164e0d019d06c0f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok I get the problem. It is the LIMIT 1 which was misleading me.

If I remove this limit, I get many returned results, some where orders
were paid, some where orders were not paid, therefore the LIMIT1 picks
the first one, and by chance it lands on an unpaid order.

Am I trying to achieve something which is not possible to do? Do I
compulsory need to make 2 queries? One for the order only and one for
the product only?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas 2008-10-30 23:11:40 Re: a LEFT JOIN problem
Previous Message Tom Lane 2008-10-30 23:00:49 Re: psql screen size