Re: Filter tables

From: Reg Me Please <regmeplease(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Osvaldo Rosario Kussama <osvaldo_kussama(at)yahoo(dot)com(dot)br>
Subject: Re: Filter tables
Date: 2007-11-12 17:22:25
Message-ID: 200711121822.25543.regmeplease@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Il Monday 12 November 2007 18:10:40 Osvaldo Rosario Kussama ha scritto:
> Try:
> SELECT DISTINCT t1.id FROM t1
> WHERE NOT EXISTS (SELECT f1.t FROM f1
> WHERE NOT EXISTS (SELECT x1.t FROM t1 x1
> WHERE f1.t = x1.t
> AND t1.id = x1.id));
>
> Osvaldo

Nice, it seems to work. But I fear it won't with a longer f1 filter table.
Let me think about it.

--
Reg me Please

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2007-11-12 17:29:37 Re: Linux v.s. Mac OS-X Performance
Previous Message Magnus Hagander 2007-11-12 17:21:19 Re: 8.2.3: Server crashes on Windows using Eclipse/Junit