agora inbox for pgsql-general@postgresql.org  
help / color / mirror / Atom feed
From: Simeó Reig <simeo@incofisa.com>
To: Lista POSTGRESQL <pgsql-general@postgresql.org>
Subject: SQL HELP
Date: Fri, 17 Jan 2003 19:30:34 +0100
Message-ID: <000b01c2be56$86178b30$0500a8c0@incofisa.com> (raw)
References: <4165C48DE9A0D211B6400800095C585F172EEC@WASHINGTON>

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  !!




view thread (15+ messages)  latest in thread

Message-ID: <000b01c2be56$86178b30$0500a8c0@incofisa.com>
Permalink:  ../000b01c2be56$86178b30$0500a8c0@incofisa.com/
Also on:    postgresql.org/message-id/000b01c2be56$86178b30$0500a8c0@incofisa.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: simeo@incofisa.com
  Subject: Re: SQL HELP
  In-Reply-To: <000b01c2be56$86178b30$0500a8c0@incofisa.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox