I have been informed that at present (postgres 7.3.2) using IN is not
advised, and I should replace it with EXISTS. I can't seem to get it to
work.
I've tried replacing (example):
SELECT
name
FROM
people
WHERE
state IN (
SELECT
id
You should use something like:
SELECT
name
FROM
people p
WHERE
exists (
SELECT
1
FROM
states
WHERE
name = p.state
)
AND state ~* 'r';
On Tue,
Rory Campbell-Lange wrote:
I have been informed that at present (postgres 7.3.2) using IN is not
advised, and I should replace it with EXISTS. I can't seem to get it to
work.
I've tried replacing (example):
SELECT
name
FROM
people
WHERE
state IN (
SELECT
Rory Campbell-Lange wrote:
I have been informed that at present (postgres 7.3.2) using IN is not
advised, and I should replace it with EXISTS. I can't seem to get it to
work.
...
SELECT
name
FROM
people
WHERE
exists (
SELECT
Why using IN is not advisable???
On 22 Jul 2003 18:36:10 +0200
Csaba Nagy [EMAIL PROTECTED] wrote:
You should use something like:
SELECT
name
FROM
people p
WHERE
exists (
SELECT
1
FROM
Actually, even better:
select name
from people p, states s
where p.state = s.name
and p.state ~* 'r';
Cheers,
Csaba.
On Tue, 2003-07-22 at 18:36, Csaba Nagy wrote:
You should use something like:
SELECT
name
FROM
people p
WHERE
exists (
Felipe Schnack wrote:
Why using IN is not advisable???
http://www.postgresql.org/docs/faqs/FAQ.html#4.22
But I believe Tom has fixed this for the upcoming 7.4.
Mike Mascari
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 1: subscribe and