X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 87CA0DB74F for ; Tue, 15 Nov 2005 14:50:05 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75538-02 for ; Tue, 15 Nov 2005 18:50:04 +0000 (GMT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.195]) by svr1.postgresql.org (Postfix) with ESMTP id 88E4BD9443 for ; Tue, 15 Nov 2005 14:50:01 -0400 (AST) Received: by xproxy.gmail.com with SMTP id s15so1525767wxc for ; Tue, 15 Nov 2005 10:50:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=RtGnIv55jtcSCAA3El8eW4k3RXb4DkD+Jg71JAZa/VnHyQUBfJVrbmPfdnbhdlgYVFaNvpgSUI3NIUU5c5O2mjyEUxDeG6eu/Vim7/ggKOkBskXQiB1SFFiPAKBrNEE165u6RAYPP7HkW7mzxNWfb/zpKXBW1Atb0Fh94ZKSzZE= Received: by 10.65.153.12 with SMTP id f12mr7529507qbo; Tue, 15 Nov 2005 10:50:02 -0800 (PST) Received: by 10.64.21.11 with HTTP; Tue, 15 Nov 2005 10:50:02 -0800 (PST) Message-ID: Date: Tue, 15 Nov 2005 14:50:02 -0400 From: Hugo To: pgsql-odbc@postgresql.org Subject: is this a odbc bug? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11251_24108560.1132080602281" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.333 required=5 tests=[HTML_MESSAGE=0.001, RCVD_IN_BL_SPAMCOP_NET=1.332] X-Spam-Score: 1.333 X-Spam-Level: * X-Archive-Number: 200511/165 X-Sequence-Number: 6401 ------=_Part_11251_24108560.1132080602281 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 =3D :zona and ano =3D :ano and campana =3D :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 =3D :zona and ano =3D :ano and campana =3D :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 =3D :zona and ano =3D :ano and campana =3D :campana and tipo in ('10', '20') and subtipo in ('01') and contrato not in ( select distinct contrato from comisiones.viru as viru where zona =3D :zona and ano =3D :ano and campana =3D :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 =3D :zona and ano =3D :ano and campana =3D :campana and tipo in ('10', '20') and subtipo in ('01') and contrato not in ( select distinct contrato from comisiones.avon as avon where zona =3D :zona and ano =3D :ano and campana =3D :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 =3D viru.zona ) and ( avon.contrato =3D viru.contrato ) and ( avon.ano =3D viru.ano ) and ( avon.campana =3D viru.campana ) and avon.zona =3D :zona and avon.ano =3D :ano and avon.campana =3D :campana and ( ( avon.tipo in ('10', '20') and avon.subtipo in ('01') ) and ( viru.tipo in ('10', '20') and viru.subtipo in ('01') )) ***** ------=_Part_11251_24108560.1132080602281 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 =3D :zona and ano =3D :ano and campana =3D :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 =3D :zona and ano =3D :ano and campana =3D :campana
        and tipo in ('50')
        and subtipo in ('02' , '03') &nb= sp; 
  group by zona,  ano, campana , contrato


union

select distinct 'P' as estado, zona, ano, campana , contrato
  from comisiones.avon as avon
  where zona =3D :zona and ano =3D :ano and campana =3D :campana
        and tipo in ('10', '20')
        and subtipo in ('01')
        and contrato not in ( 
               =     select distinct contrato
               =     from comisiones.viru as viru
                    where zona =3D :zona and ano =3D :ano and campana =3D :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 <= br>   from comisiones.viru as viru
  where zona =3D :zona and ano =3D :ano and campana =3D :campana
        and tipo in ('10', '20')
        and subtipo in ('01')
        and contrato not in ( 
               =     select distinct contrato
               =     from comisiones.avon as avon
                    where zona =3D :zona and ano =3D :ano and campana =3D :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 v= iru
   WHERE ( avon.zona =3D viru.zona ) and 
         ( avon.contrato =3D viru.c= ontrato ) and 
         ( avon.ano =3D viru.ano ) = and 
         ( avon.campana =3D viru.ca= mpana )    and
            avon.zona =3D :zon= a and avon.ano =3D :ano and avon.campana =3D :campana
            and ( ( avon.tipo = in ('10', '20')
                            and avon.subtipo in ('01') )
               =     and ( viru.tipo in ('10', '20')
                            and viru.subtipo in ('01') ))

*****
------=_Part_11251_24108560.1132080602281--