Re: query with =ALL - Mailing list pgsql-sql

From Jaime Casanova
Subject Re: query with =ALL
Date
Msg-id BAY8-F43IO1PH5phq9d0003307c@hotmail.com
Whole thread Raw
In response to query with =ALL  ("Jaime Casanova" <el_vigia_ec@hotmail.com>)
Responses Re: query with =ALL
List pgsql-sql
Hi all,

> > AND
> > CPA.cur_paralelo = ALL (SELECT cur_paralelo FROM aca_t_curso ...)
>
>Wait a second ... we are all overthinking the problem.  The subselect
>returns three *different* values.  It is not possible for any
>CPA.cur_paralelo values to be simultaneously equal to all three.
>So this test certainly fails at every row of CPA.
>
>Perhaps you meant "= ANY"?

Not really becuase ANY has the same efect that IN and what i want is all the 
results that are equal in all the rows in any of the cur_paralelo values. 
But must be in all the cur_paralelo or nothing.

thanx in advance,

Jaime Casanova

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: query with =ALL
Next
From: Tom Lane
Date:
Subject: Re: query with =ALL