Re: query from two tables & concat the result - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: query from two tables & concat the result
Date
Msg-id 56B1FE4B.3030006@iol.ie
Whole thread Raw
In response to Re: query from two tables & concat the result  (arnaud gaboury <arnaud.gaboury@gmail.com>)
Responses Re: query from two tables & concat the result
List pgsql-general
On 03/02/2016 13:11, arnaud gaboury wrote:

> Hum hum...
> ------------------------------------------------------
> SELECT u.username ||'@'||d.domain as email_address
> FROM email.mailusers u
> INNER JOIN
> email.domain d
> ON
> (u.domain_id=d.domain.id)
> WHERE id=1;
>
> ERROR:  missing FROM-clause entry for table "domain"
> LINE 6: (u.domain_id=d.domain.id)
> --------------------------------------------------------------
>
> What did I wrong following your solution?

In the join condition, replace "d.domain.id" with "d.id" (partly my
mistake, I missed that the column is called "id" and not "domain_id" in
the domains table).

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


pgsql-general by date:

Previous
From: arnaud gaboury
Date:
Subject: Re: query from two tables & concat the result
Next
From: arnaud gaboury
Date:
Subject: Re: query from two tables & concat the result