Received: from alice.stimpy.com (root@alice.stimpy.com [208.211.184.17]) by hub.org (8.9.1/8.9.1) with ESMTP id WAA12777 for ; Tue, 1 Dec 1998 22:43:14 -0500 (EST) (envelope-from walt@stimpy.com) Received: from alice.stimpy.com (alice.stimpy.com [208.211.184.17]) by alice.stimpy.com (8.8.6/8.6.9) with SMTP id UAA01368 for ; Tue, 1 Dec 1998 20:38:58 -0800 Date: Tue, 1 Dec 1998 20:38:58 -0800 (PST) From: Walt Bigelow To: pgsql-sql@postgreSQL.org Subject: joins and stuff Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hello all: I am having an issue related to returning of records within a join. Here is the join that I am doing: SELECT projecttitle, wonumber, date, tbladdressdirectory.company as fclient, tbladdressdirectory_1.company as agency, tbladdressdirectory_2.company as agencyclient, tblcontacts.contactname as contact FROM tblproject, tbladdressdirectory, tbladdressdirectory as tbladdressdirectory_1, tbladdressdirectory as tbladdressdirectory_2, tblcontacts WHERE tblproject.fclient = tbladdressdirectory.agencyid AND tblproject.agencyid = tbladdressdirectory_1.agencyid AND tblproject.aclientid = tbladdressdirectory_2.agencyid AND tblproject.fclientcontactid = tblcontacts.contactid AND projectid = 77; I came upon a record with an invalid contactid in tblprojects (an id that is not in the tblcontacts table) and the resultant output is (0 rows). My question is how can I have the server return a row weather or not a join completed successfully? i.e. Have it return a NULL or something when it cannot match the 2 tables, instead of failing completely. It was mostly my stupid mistake that caused the above to occour -- the front end (msAccess yuck) that I wrote failed to update or check to see if the contact I was deleting is actually in use or not. But on another table I would like the option of having a field in the main table NULL and still have the select return everything else. Thanks for any help, Walt