Re: Help with a double left join - Mailing list pgsql-sql

From Tom Lane
Subject Re: Help with a double left join
Date
Msg-id 3975.993222908@sss.pgh.pa.us
Whole thread Raw
In response to RE: Help with a double left join  ("Ari Nepon" <anepon@verveinternet.com>)
List pgsql-sql
"Ari Nepon" <anepon@verveinternet.com> writes:
> Thanks Alex. But it was too good to be true. Or, more likely, I did
> something else wrong.

clients.ID => client.ID, likely.

regression=# create table track(project int, client int);
CREATE
regression=# create table project(project_id int);
CREATE
regression=# create table client(ID int);
CREATE
regression=# select * from track LEFT JOIN project ON track.project=project.pro
ject_id
regression-# LEFT JOIN client ON track.client=clients.ID;
ERROR:  Relation 'clients' does not exist
regression=# select * from track LEFT JOIN project ON track.project=project.pro
ject_id
regression-# LEFT JOIN client ON track.client=client.ID;project | client | project_id | id
---------+--------+------------+----
(0 rows)
    regards, tom lane


pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: View performance question
Next
From: Alex Pilosov
Date:
Subject: Re: What is a "tuple"