Re: Alternative to INTERSECT - Mailing list pgsql-sql

From Rodrigo De León
Subject Re: Alternative to INTERSECT
Date
Msg-id a55915760707311330g7e977a63wbb616023d5d2563a@mail.gmail.com
Whole thread Raw
In response to Alternative to INTERSECT  (Andreas Joseph Krogh <andreak@officenet.no>)
List pgsql-sql
On 7/31/07, Andreas Joseph Krogh <andreak@officenet.no> wrote:
> Is there a way to make this more efficient with another construct, or
> INTERSECT the only way to accomplish the desired result?

SELECT f1.ID FROM TEST f1 JOIN TEST f2 ON f1.ID = f2.ID      JOIN TEST f3 ON f2.ID = f3.IDWHERE f1.FIELD = 'firstname'
ANDf1.VALUE LIKE 'andrea%'  AND f2.FIELD = 'firstname'  AND f2.VALUE LIKE 'jose%'  AND f3.FIELD = 'lastname'  AND
f3.VALUELIKE 'kro%';
 


pgsql-sql by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Re: Alternative to INTERSECT
Next
From: Stephan Szabo
Date:
Subject: Re: Alternative to INTERSECT