pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: G.L. Grobe <gary@grobe.net>
To: pgsql-general@postgresql.org
Subject: query help
Date: Thu, 30 Aug 2001 18:45:20 -0500
Message-ID: <000d01c131ad$d4b9e3a0$0200a8c0@trinity> (raw)

Hi all,

How would I get TableB.label if all I know about is TableA.name?

I was thinking about a query on TableA first, then within the while
(rs.next()), I'd do another query using the result set from A on B, but I
don't like that much, and it seems kind of slow.

Any help much appreciated!

TableA
idA | name | class
-----------------
11    test1   1
12    test2   1
13    test3   2
14    test4   2

TableB
idB | idA | label
----------------
1     11     nameA
2     12     nameB
3     13     nameC
4     14     nameD






view thread (70+ messages)  latest in thread

Message-ID: <000d01c131ad$d4b9e3a0$0200a8c0@trinity>
Permalink:  ../000d01c131ad$d4b9e3a0$0200a8c0@trinity/
Also on:    postgresql.org/message-id/000d01c131ad$d4b9e3a0$0200a8c0@trinity

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: gary@grobe.net
  Subject: Re: query help
  In-Reply-To: <000d01c131ad$d4b9e3a0$0200a8c0@trinity>
  References: <000d01c131ad$d4b9e3a0$0200a8c0@trinity>

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

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