Re: Left join syntax error

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Left join syntax error
Date: 2024-05-18 14:46:39
Message-ID: 3216489-758a-faef-b21b-84c9679f53c@appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 18 May 2024, Shammat wrote:

> Don't put the second table in the FROM part
>
> SELECT p.lname, p.fname, p.job_title, p.company_nbr, p.email, c.company_name
> FROM people as p
> LEFT JOIN companies as c ON c.company_nbr = p.company_nbr

Shammat,

I tried this with this result:

ERROR: missing FROM-clause entry for table "c"
LINE 3: LEFT JOIN companies ON c.company_nbr = p.company_nbr;

Thanks for the suggestion.

Regards,

Rich

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-05-18 14:48:02 Re: Valid until
Previous Message Adrian Klaver 2024-05-18 14:40:35 Re: Valid until