Join Issues

From: Dev <dev(at)umpa-us(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Join Issues
Date: 2003-12-17 00:11:33
Message-ID: 6.0.1.1.0.20031216190742.01c2a038@pop3.umpa-us.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

I have been working with joins and having alot of success up until now.

What I have is this:
SELECT a.merno
,g.mcmid
FROM (
total AS a LEFT JOIN mcmid AS g ON (g.merno=a.merno))
WHERE a.repno='111111'
AND a.month='2003-11-01'
AND g.month='2003-11-01'
ORDER BY merno

Currently it is returning only 178 records where it should be returning 407
records.
The 401 records are what are returned from the total table.

I beleave the problem is with the:
AND g.month='2003-11-01'

any clues?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Thomas 2003-12-17 00:13:41 Re: Firebird and PostgreSQL at the DB Corral.
Previous Message Jenny Zhang 2003-12-17 00:07:26 Re: update slows down in pl/pgsql function