From: Jaime Casanova <el_vigia_ec@hotmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: query with =ALL
Date: Mon, 14 Jun 2004 18:01:26 +0000
Message-ID: <BAY8-F95b2tyFGcbNZO00002824@hotmail.com> (raw)
>Jaime Casanova wrote:
>>Hi all,
>>
>>i have an strange result here, i'm using 7.4.2 on redhat 8
>>
>>i have a query like this
>
>[snip]
>
>>this query proves that its result is 'A', 'B', 'C'
>>any idea, is something wrong in my thinking?
>Do you have any null values involved? That might well interfere (though I
>admit I haven't looked in >detail)
There are no null values here, i'm sure of that because all the fields in
the subquery included the one i'm returning are part of the PK
>--
> Richard Huxton
> Archonet Ltd
and when i do the selects individually i got the correct results
SELECT CPA.rub_codigo, RUB.rub_descripcion, CPA.cpa_valor,
CPA.cpa_fechavencimiento
FROM rec_m_cuadropagos CPA, rec_m_rubro RUB
WHERE RUB.ent_codigo = CPA.ent_codigo AND RUB.rub_codigo = CPA.rub_codigo
AND
CPA.ent_codigo = 1 AND CPA.sec_codigo = 1 AND CPA.ani_codigo =
'2004-2005' AND
CPA.cic_codigo = 1 AND CPA.esp_codigo = 0 AND CPA.cur_codigo = 1 AND
CPA.cur_paralelo = 'A '
1 Matrícula
100 05/10/2005
SELECT CPA.rub_codigo, RUB.rub_descripcion, CPA.cpa_valor,
CPA.cpa_fechavencimiento
FROM rec_m_cuadropagos CPA, rec_m_rubro RUB
WHERE RUB.ent_codigo = CPA.ent_codigo AND RUB.rub_codigo = CPA.rub_codigo
AND
CPA.ent_codigo = 1 AND CPA.sec_codigo = 1 AND CPA.ani_codigo =
'2004-2005' AND
CPA.cic_codigo = 1 AND CPA.esp_codigo = 0 AND CPA.cur_codigo = 1 AND
CPA.cur_paralelo = 'B '
1 Matrícula
100 05/10/2005
SELECT CPA.rub_codigo, RUB.rub_descripcion, CPA.cpa_valor,
CPA.cpa_fechavencimiento
FROM rec_m_cuadropagos CPA, rec_m_rubro RUB
WHERE RUB.ent_codigo = CPA.ent_codigo AND RUB.rub_codigo = CPA.rub_codigo
AND
CPA.ent_codigo = 1 AND CPA.sec_codigo = 1 AND CPA.ani_codigo =
'2004-2005' AND
CPA.cic_codigo = 1 AND CPA.esp_codigo = 0 AND CPA.cur_codigo = 1 AND
CPA.cur_paralelo = 'C '
1 Matrícula
100 05/10/2005
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: el_vigia_ec@hotmail.com
Subject: Re: query with =ALL
In-Reply-To: <BAY8-F95b2tyFGcbNZO00002824@hotmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox