From: | "Raymond O'Donnell" <rod(at)iol(dot)ie> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: SQL question - duplicate records from join |
Date: | 2002-03-04 12:51:57 |
Message-ID: | 3C836DED.7183.62A787@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi folks,
I sent the attached email a few days ago, and if anyone can help me
I'd be really appreciative - I'm no SQL guru and this one has me
stumped! If this is the wrong forum for this message please do
redirect me.
--Ray.
On 28 Feb 2002 at 18:46, Raymond O'Donnell wrote:
> I recently upgraded to Postgres 7.1 (having finally found the correct
> pg_dump!), and now I notice that joins are returning duplicate
> records. A typical query would be:
>
> select i.itemcode, i.itemname, d.deptname, r.roomname
> from items i
> inner join departments d on (i.deptcode=d.deptcode)
> inner join rooms r on (i.roomcode=r.roomcode)
> where... (etc)
>
> This query returns four copies of each record, where before I just got
> one as I'd expect. Am I doing something wrong here?
---------------------------------------------------------
Raymond O'Donnell http://www.iol.ie/~rod/organ
rod(at)iol(dot)ie The Irish Pipe Organ Page
---------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Wood | 2002-03-04 12:52:14 | Re: Arrays in pgsql |
Previous Message | Gregory Wood | 2002-03-04 12:32:43 | Re: oids vs. serial question |