Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3565E476592 for ; Thu, 16 Jan 2003 18:15:15 -0500 (EST) Received: from localhost.localdomain (unknown [65.217.53.66]) by postgresql.org (Postfix) with ESMTP id 00CD84768A5 for ; Thu, 16 Jan 2003 18:12:16 -0500 (EST) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id h0GNVC6P004073; Thu, 16 Jan 2003 18:31:12 -0500 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id h0GNCCj27055; Thu, 16 Jan 2003 18:12:12 -0500 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id CWVLBMJ8; Thu, 16 Jan 2003 18:12:11 -0500 Subject: Re: OT: seeking query help, where? From: Robert Treat To: Tim Lynch Cc: pgsql-admin@postgresql.org In-Reply-To: <071501c2bdac$cabaa790$2c0210ac@loisaida> References: <071501c2bdac$cabaa790$2c0210ac@loisaida> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 16 Jan 2003 18:12:12 -0500 Message-Id: <1042758732.12025.19.camel@camel> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/182 X-Sequence-Number: 7024 there are several ways to do this, one example would be: select distinct(email_addr) from table1 union select distinct(email_addr) from table2 You can ask questions like these on the pgsql-newbies or pgsql-sql lists if you'd like (though generally you shouldn't get flamed no matter which group you post to) Robert Treat On Thu, 2003-01-16 at 17:15, Tim Lynch wrote: > First, sorry for the OT, flame me off-list! > > I'm a sysadmin being impressed into dba service. i've been getting along > pretty well writing queries and making reports, but i've got some questions. > suggestions for a good list/forum for help? > > from two tables both with email_addr columns, i want a distinct list of all > email_addrs in one column. what i do now is select distinct on each and then > sort -u the results. > > thanks in advance > -t > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)