Received: from mailout00.sul.t-online.de (mailout00.sul.t-online.com [194.25.134.16]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6DGfqa51985 for ; Fri, 13 Jul 2001 12:41:53 -0400 (EDT) (envelope-from A_Schnabel@t-online.de) Received: from fwd04.sul.t-online.de by mailout00.sul.t-online.de with smtp id 15L60l-0004gi-08; Fri, 13 Jul 2001 18:41:51 +0200 Received: from taska (520019441306-0001@[62.226.22.90]) by fwd04.sul.t-online.com with smtp id 15L60i-1k9AYaC; Fri, 13 Jul 2001 18:41:48 +0200 Message-ID: <003001c10bba$ab3849e0$0201a8c0@aschnabel.homeip.net> From: A_Schnabel@t-online.de (Andre Schnabel) To: References: <200107130611.LAA24039@Larry.bks> Subject: Re: How can we match a condition among 2 diff. tables? Date: Fri, 13 Jul 2001 18:41:29 +0200 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 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Sender: 520019441306-0001@t-dialin.net X-Archive-Number: 200107/174 X-Sequence-Number: 3966 Hi, if you translate your (english) idea striktly to SQL, you'll make it ;-) > Now, i need to get the details of all employees who did > receive NONE of the salesorders. ie.. i wish to select the > records of table 'employee' whose 'emp_id' are not > there in table 'salesorder'. SELECT * FROM employee WHERE emp_id NOT IN ( SELECT emp_id FROM salesorder );