From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | "Correia, Carla" <Carla(dot)Correia(at)logicacmg(dot)com> |
Cc: | "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Complex outer joins? |
Date: | 2003-03-24 15:12:35 |
Message-ID: | 20030324070821.Q24147-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Mon, 24 Mar 2003, Correia, Carla wrote:
> My problem is joins. I've seen the syntax on joins and have sucessefully
> used SQLs with joins, but I've got some other big SQL statements using many
> and complex
> joins.
> Simplified example:
>
> select G.SELID, G.TEXT,
> L.ID as SELLEVELID , L.SELLEVEL, L.LEVELJOIN, L.LEVELTEXT,
> C.ID as KRITERIENFELDID, C.SELFLD
> from G, L, C
> where
> and G.SELID = L.SELID (+)
> and L.SELID = C.SELID (+)
> and L.SELLEVEL = C.SELLEVEL (+)
>
> How can i write this in Postgres? As the problem is that I use one same
> table for varios joins. This is a problem in Postgres. Any ideas?
I don't really understand the question, it looks like two levels of outer
join to me, the first between g and l using selid and the second between
that and c using selid and sellevel. What do you mean "one same table for
various joins"?
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-03-24 15:18:10 | Re: Complex outer joins? |
Previous Message | Tom Lane | 2003-03-24 15:02:02 | Re: function with security definer |