X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 87146310C52 for ; Tue, 1 Jul 2003 11:14:41 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 33142-08 for ; Tue, 1 Jul 2003 08:14:31 -0300 (ADT) Received: from pengo.systems.pipex.net (pengo.systems.pipex.net [62.241.160.193]) by svr1.postgresql.org (Postfix) with ESMTP id 569F4310C5E for ; Tue, 1 Jul 2003 08:14:28 -0300 (ADT) Received: from kevin (1Cust223.tnt5.lnd4.gbr.da.uu.net [62.188.134.223]) by pengo.systems.pipex.net (Postfix) with SMTP id 93BD54C00822 for ; Tue, 1 Jul 2003 12:14:26 +0100 (BST) Message-ID: <000701c33fc1$b83dc600$3401a8c0@kevin> Reply-To: "kevin rowe" From: "kevin rowe" To: Subject: mergejoin error message executing in 7.2 Date: Tue, 1 Jul 2003 12:12:16 +0100 Organization: Merit Technology (Europe) Limited MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Archive-Number: 200307/25 X-Sequence-Number: 14139 hi there, I have a problem trying to execute a complex query that was designed in 7.3.2 to a machine running 7.2.x this is the error message FULL JOIN is only supported with mergejoinable join conditions this is the source string for a jdbc prepared statement. (it has ordering clause added at the end using string concatenation) this string works fine in 7.3.2 but fails runtime in 7.2. Does anyone know what the problem is? I can't find the message on the net anywhere except in the 'C' source on postgres's developer channel or some japanese site (sigh). strSQL = "SELECT stock," + " p.description," + " p.stockgroup," + " o.ordercurrent," + " o.type," + " s.quantity," + " a.ordercurrent, " + " a.type " + " FROM " + " (SELECT stock,ordercurrent,type,line " + " FROM orderlines o " + " WHERE o.theorder = ? " + " AND (o.TYPE='P' OR o.TYPE='T') ) AS o" + " FULL OUTER JOIN " + " (SELECT DISTINCT ON (stock) stock,quantity " + " FROM standingorders s " + " WHERE s.account = ? " + " AND s.dayno = ? " + " AND s.delivery = ? "+ " AND commencedate <= ? " + " ORDER BY stock, commencedate DESC) AS s " + " USING (stock) " + " FULL OUTER JOIN " + " (SELECT stock,ordercurrent,type " + " FROM orderlines ol " + " WHERE ol.theorder = ? " + " AND ol.TYPE<>'P' " + " AND ol.TYPE<>'T' ) AS a " + " USING (stock) " + " INNER JOIN stockitems p ON (p.id=stock) " + " WHERE p.status='N' " + " ORDER BY "; Any help greatly appreciated. Regards, Kevin