X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 46EE39FB2ED for ; Fri, 4 Aug 2006 04:24:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 38933-01 for ; Fri, 4 Aug 2006 07:24:43 +0000 (UTC) X-Greylist: delayed 00:30:01.787942 by SQLgrey- Received: from MVGTREND2.mvg.local (unknown [217.33.193.205]) by postgresql.org (Postfix) with ESMTP id B1A609FB2EC for ; Fri, 4 Aug 2006 04:24:42 -0300 (ADT) Received: from MVGMAIL.mvg.local ([10.100.2.5]) by MVGTREND2.mvg.local with InterScan Message Security Suite; Fri, 04 Aug 2006 07:55:35 +0100 Content-class: urn:content-classes:message Subject: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 4 Aug 2006 07:55:35 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <746457F7E51F3B4BB53A8447D7204B78E44F@MVGMAIL.mvg.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: thread-index: Aca3ksyRDDe/lKKwTT+lKlNJpbNrcQ== From: "Jonathan Sinclair" To: X-imss-version: 2.041 X-imss-result: Passed X-imss-scanInfo: M:P L:E SM:0 X-imss-tmaseResult: TT:0 TS:0.0000 TC:00 TRN:0 TV:3.52.1006(14608.001) X-imss-scores: Clean:73.52193 C:2 M:3 S:5 R:5 X-imss-settings: Baseline:2 C:1 M:1 S:1 R:1 (0.1500 0.1500) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.951 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, MISSING_SUBJECT X-Spam-Level: * X-Archive-Number: 200608/62 X-Sequence-Number: 26020 I'm currently handling a migration from an Informix system to both mySQL and Postgres (same data in each).=0D Having uploaded the DB's into both systems, from Informix, I am having some problems carrying out a query. The query, which I believe, is in standard SQL is as follows: SELECT field1, SUM(field2) as Field2, SUM(field3) FROM table1 tb1, table2 tb2 WHERE tb1.field5 BETWEEN '03/07/2006' AND '03/08/2006' AND tb1.field6 =3D tb2.field7 AND tb1.field8 =3D tb2.field8 AND tb2.field9 BETWEEN 50.00 AND 150.00 GROUP BY field1 HAVING SUM(field2) BETWEEN 95.00 AND 100.00 ORDER BY 2 DESC, field1; *The 'field(n)' and 'table(n)' values have been substituted for actual field names!=0D The results I get from Informix and mySql return identical results, however postgres includes a great deal more i.e. 11 rows from Informix and mySQL, 203 from postgres.=0D Does anyone have any idea why this disparity may exist? =0D This email may contain information which is privileged or confidential.= This information is intended only for the named recipient. If you are not= the intended recipient, please be aware that disclosure, copying,= distribution or use of this information is prohibited. If you have= received this email in error, we would be grateful if you would inform us= as soon as possible by telephoning +44 (0) 1769 573431, or by email to= admin@molevalleyfarmers.com and then delete this email. Views or opinions= expressed in this email are those of the writer, and are not necessarily= the views of Mole Valley Farmers Limited or its subsidiary companies.= Unless specifically stated, this email does not constitute any part of an= offer or contract.=0D