Search Postgresql Archives

Re: Apparently I don't understand full outer joins....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks guys, this works great.

On Tue, 25 Jan 2005, Stephan Szabo wrote:

> 
> Each outer join gets an on clause.  You might want something like:
> select
>         coalesce(a.n,0) as a,
>         coalesce(b.n,0) as b,
>         coalesce(c.n,0) as c,
>         coalesce(a.s,b.s,c.s) as s
> from
>         ( select 1 as n, 0 as s) a full outer join
>         ( select 1 as n, 1 as s) b on (a.s=b.s) full outer join
>         ( select 2 as n, 2 as s) c on b.s = c.s;
> 
> 



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux