Re: OUTER JOIN with filter

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Nicolas Fertig <nfertig(at)swissnow(dot)ch>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: OUTER JOIN with filter
Date: 2003-03-02 01:07:09
Message-ID: 20030301170535.U21117-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Sat, 1 Mar 2003, Nicolas Fertig wrote:

> Can anyone help me with the problem bellow ?
>
> SELECT TM.some_field, TS.name
> FROM table_main TM
> LEFT OUTER JOIN (SELECT name FROM table_slave WHERE c1 = 'myvalue') TS
> USING(id)

Maybe,

select tm.some_field, ts.name
from table_tmain tm left outer join table_slave ts
on (tm.id=ts.id and ts.c1='myvalue');

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Wolff III 2003-03-02 01:54:06 Re: OUTER JOIN with filter
Previous Message Denis Zaitsev 2003-03-02 00:41:47 Re: Are scalar type's in/out functions implicitly STRICT?