Received: from gw.acate.com.br ([200.215.17.89]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eA71CMs57744 for ; Mon, 6 Nov 2000 20:12:23 -0500 (EST) (envelope-from edmar@brasmap.com) Received: from joana ([192.168.1.13]) by gw.acate.com.br (8.9.3/8.9.3) with SMTP id XAA22489; Mon, 6 Nov 2000 23:11:50 -0200 From: "Edmar Wiggers" To: "Warren Vanichuk" , Subject: RE: SQL question regarding a couple of table joins. Date: Mon, 6 Nov 2000 23:14:58 -0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 In-Reply-To: X-Archive-Number: 200011/46 X-Sequence-Number: 77 > SELECT > > links.linkid, > > links.linkurl, > links.linktext, > links.bannerid, > linkdaystats.linkid > FROM > links, > linkdetail , > linkdaystats > WHERE > links.linkid = linkdetail.linkid I guess you have forgot to include: "links.linkid = linkdaystats.linkid" Moreover, if table linkdaystats is empty that query will return NOTHING. The solution is to remove linkdaystats from the query, or wait for 7.1 and use OUTER JOINs. Yours sincerely, Edmar Wiggers BRASMAP Information Systems +55 48 9960 2752