From: Bruno Wolff III <bruno@wolff.to>
To: Edward W. Rouse <erouse@comsquared.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: problem with join
Date: Wed, 14 Feb 2007 22:02:52 -0600
Message-ID: <20070215040252.GA24667@wolff.to> (raw)
In-Reply-To: <003d01c75086$829326b0$143c520a@ntc2s.comsquared.com>
References: <003d01c75086$829326b0$143c520a@ntc2s.comsquared.com>
On Wed, Feb 14, 2007 at 17:21:44 -0500,
"Edward W. Rouse" <erouse@comsquared.com> wrote:
>
> I tried using coalesce(count(value4)) and case count(value4) = 0
> with no luck. I tried left and right joins and the right join gave me
> the same results while the left join gave me rows like:
That is because neither side of the join had all combinations of numbers
and letters. One approach would be to cross join a table with 'one', 'two',
and 'three' with one with 'a', 'b', 'c', 'd', 'e', and 'f'. And then
left join the query above to it.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bruno@wolff.to, erouse@comsquared.com
Subject: Re: problem with join
In-Reply-To: <20070215040252.GA24667@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox