Received: from s20.highertech.net (root@s20.highertech.net [209.54.120.20]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA59230 for ; Fri, 30 Apr 1999 11:57:14 -0400 (EDT) (envelope-from jt-kirkpatrick@mpsllc.com) Received: from kirkpatrickjt (whiteoak-34.highertech.net [209.140.56.34] (may be forged)) by s20.highertech.net (8.8.6/8.8.6) with SMTP id LAA09376 for ; Fri, 30 Apr 1999 11:56:18 -0400 Received: by localhost with Microsoft MAPI; Fri, 30 Apr 1999 11:59:08 -0400 Message-ID: <01BE9300.DA3BFC80.jt-kirkpatrick@mpsllc.com> From: JT Kirkpatrick To: "'pgsql-sql@hub.org'" Subject: combining a single field in two tables into one column. Date: Fri, 30 Apr 1999 11:59:05 -0400 Organization: MPS, LLC X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit i come seeking wisdom. . . i have two tables, one for subcontractors and another for vendors. subs have a primary key of subnum int4, vendors a primary key of vnum int4. i need to create a query that allows me to see a complete list of these numbers in a single column. for instance, subnum (all begin with 9) has values 90001, 90002, 90003 (only three records for the example), and vnum (all begin with 2) has values 20001, 20002. i'd like my query result to show: 90001 90002 90003 20001 20002 this does NOT work: select a.subnum as z, b.vnum as z from subs a, vend b; NOR does: select a.subnum, b.vnum from subs a, vend b; by the way, the two tables DO NOT relate to each other (i.e., 90001 does not have anything to do with 20001). . . TIA, jt