Re: is this a odbc bug?

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: is this a odbc bug?
Дата
Msg-id 000701c5ea16$5d695597$6a01a8c0@valehousing.co.uk
обсуждение исходный текст
Ответ на is this a odbc bug?  (Hugo <htakada@gmail.com>)
Список pgsql-odbc
-----Original Message-----
From: "Hugo"<htakada@gmail.com>
Sent: 15/11/05 18:52:04
To: "pgsql-odbc@postgresql.org"<pgsql-odbc@postgresql.org>
Subject: [ODBC] is this a odbc bug?

>. now I installed the 8.1.0 plus the odbc driver ,
> and now my application is returning wrong results ,

Upgrade to 08.01.0101 and sanity should return :-)

Regards, Dave

-----Unmodified Original Message-----
Hi , has anybody experienced any problem with the odbc driver that comes
with postgres 8.1.0 , I was testing my application against the beta 4 and
everything was working OK, now I installed the 8.1.0 plus the odbc driver ,
and now my application is returning wrong results , the application is the
same, no one modification was done, if I run my query from withing the
interactive sql editor of pgAdmin, the query returns what it is supposed to
return, the same query from my application doesnt work ( I tested the query
in PowerBulder 8 and VASmalltalk 7 both with same wrong result).

I would appreciate any hint on this

thanks in advance

Hugo

below is the query, this query should return rows with D's and P's , but it
returns only rows with D's, the problem is that if I count the rows I
realize that it returns all the rows it should (642), but it returns all of
them with D's, if I run the same query from pgAdmin it returns all the
rows(642) but with the correct values , 412 P's and 230 D's

*****
select distinct 'D' as estado , zona, ano, campana , contrato
from comisiones.avon as avon
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('50')
and subtipo in ('02' , '03')
group by zona, ano, campana , contrato

union

select distinct 'D' as estado , zona, ano, campana , contrato
from comisiones.viru as viru
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('50')
and subtipo in ('02' , '03')
group by zona, ano, campana , contrato


union

select distinct 'P' as estado, zona, ano, campana , contrato
from comisiones.avon as avon
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('10', '20')
and subtipo in ('01')
and contrato not in (
select distinct contrato
 from comisiones.viru as viru
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('10', '20')
and subtipo in ('01')

)
group by zona, ano, campana , contrato

union

select distinct 'P' as estado, zona, ano, campana , contrato
from comisiones.viru as viru
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('10', '20')
and subtipo in ('01')
and contrato not in (
select distinct contrato
from comisiones.avon as avon
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('10', '20')
and subtipo in ('01')
)

group by zona, ano, campana , contrato

union
SELECT DISTINCT 'P' as estado, avon.zona as zona, avon.ano as ano ,
avon.campana as campana , avon.contrato
FROM comisiones.avon as avon,
comisiones.viru as viru
WHERE ( avon.zona = viru.zona ) and
( avon.contrato = viru.contrato ) and
( avon.ano = viru.ano ) and
( avon.campana = viru.campana ) and
avon.zona = :zona and avon.ano = :ano and avon.campana = :campana
and ( ( avon.tipo in ('10', '20')
and avon.subtipo in ('01') )
and ( viru.tipo in ('10', '20')
and viru.subtipo in ('01') ))

*****
 <pgsql-odbc@postgresql.org>

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Mailing list activity
Следующее
От: "Campbell, Greg"
Дата:
Сообщение: Re: Visual Studio 2005 not happy with postgresql