is this a odbc bug?

From: Hugo <htakada(at)gmail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: is this a odbc bug?
Date: 2005-11-15 18:50:02
Message-ID: f3d9ba990511151050g214df0f8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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(at)postgresql(dot)org>

Browse pgsql-odbc by date

  From Date Subject
Next Message Bruce Momjian 2005-11-15 18:56:52 Mailing list activity
Previous Message john m langdon 2005-11-15 16:58:18 PgSQL ODBC, ADO and output parameters