Received: from sys27.hou.wt.net (sys27.hou.wt.net [205.230.159.27]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7UNhKf29735 for ; Thu, 30 Aug 2001 19:43:20 -0400 (EDT) (envelope-from gary@grobe.net) Received: from trinity (216-119-143-237.ipset23.wt.net [216.119.143.237]) by sys27.hou.wt.net (8.9.3/8.9.3) with SMTP id SAA31669 for ; Thu, 30 Aug 2001 18:43:08 -0500 (CDT) Message-ID: <000d01c131ad$d4b9e3a0$0200a8c0@trinity> From: "G.L. Grobe" To: Subject: query help Date: Thu, 30 Aug 2001 18:45:20 -0500 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 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200108/1045 X-Sequence-Number: 14487 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