Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 123C0475F39 for ; Fri, 17 Jan 2003 13:30:38 -0500 (EST) Received: from mail.incofisa.com (213-96-16-90.uc.nombres.ttd.es [213.96.16.90]) by postgresql.org (Postfix) with ESMTP id 860E1475EE1 for ; Fri, 17 Jan 2003 13:30:36 -0500 (EST) Received: from www (www.incofisa.com [192.168.0.5]) by mail.incofisa.com (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) with SMTP id h0HIVOA31718 for ; Fri, 17 Jan 2003 19:31:24 +0100 Message-ID: <000b01c2be56$86178b30$0500a8c0@incofisa.com> From: =?iso-8859-1?Q?Sime=F3_Reig?= To: "Lista POSTGRESQL" References: <4165C48DE9A0D211B6400800095C585F172EEC@WASHINGTON> Subject: SQL HELP Date: Fri, 17 Jan 2003 19:30:34 +0100 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.4920.2300 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/654 X-Sequence-Number: 35775 I've two tables A and B: Table A -------- idTableA (Primary key) otherFields table B -------- idTableB idTableA otherFields Primary key (idTableB, idTableA) I need to known idTableB from table B where have idTableA=1 but not have any idtable=2 table B ------- idtableB idTableA OtherFields 1 1 ---- 1 2 ---- 2 1 ----- 3 1 ------ The result must be 2 and 3. Thanks a lot !!