Received: from brain.proaxis.com (root@brain.proaxis.com [206.163.142.1]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA61815 for ; Wed, 2 Feb 2000 23:31:33 -0500 (EST) (envelope-from sec@proaxis.com) Received: from localhost.localdomain (la00-57.inet-x.net [198.106.196.57]) by brain.proaxis.com (8.9.3/8.9.3) with SMTP id UAA09219 for ; Wed, 2 Feb 2000 20:31:30 -0800 (PST) From: Scott Chapman Reply-To: sec@proaxis.com Organization: Lamplight Computer Service To: pgsql-sql@postgresql.org Subject: SQL Query help needed - newbie question Date: Wed, 2 Feb 2000 20:30:47 -0800 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00020220331102.00960@localhost.localdomain> Content-Transfer-Encoding: 8bit I am new to SQL and PostgreSQL and I'm not sure how to get this done in one query: I have 3 tables: Vendor ------ VendorNumber EmailAddress ..... CrossReference -------------- VendorNumber PartType SystemType PartRequest -------- RequestNumber PartType SystemType ..... I am processing the Parts Requests. I need a query that returns the PartRequest.RequestNumber and Vendor.EmailAddress so I can send the Request to all Vendors that carry the requested PartType & SystemType combinations of parts. So a given Request may be for a PartType of PrinterCable and SystemType of Macintosh. The CrossReference table has a list of all vendors that carry PrinterCables for Macintoshes. I am using PostgreSQL so I don't have foreign keys and I'm not sure enough of SQL yet to know if that's a problem. Can someone here please help me with this query? Thanks! -- Scott Chapman sends.... sec@proaxis.com