| From: | Andrew Perrin <clists(at)perrin(dot)socsci(dot)unc(dot)edu> |
|---|---|
| To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
| Cc: | Tim Lynch <admin+pgsqladmin(at)thirdage(dot)com>, pgsql-admin(at)postgresql(dot)org |
| Subject: | Re: OT: seeking query help, where? |
| Date: | 2003-01-17 15:05:07 |
| Message-ID: | Pine.LNX.4.21.0301171004580.16506-100000@perrin.socsci.unc.edu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
Hey, thanks - nice to learn something.
ap
----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists(at)perrin(dot)socsci(dot)unc(dot)edu * andrew_perrin (at) unc.edu
On Fri, 17 Jan 2003, Bruno Wolff III wrote:
> On Fri, Jan 17, 2003 at 08:57:14 -0500,
> Andrew Perrin <clists(at)perrin(dot)socsci(dot)unc(dot)edu> wrote:
> > I'd suggest something similar to, but slightly different from, what others
> > have:
> >
> > SELECT DISTINCT email FROM (SELECT email FROM table_1 UNION SELECT
> > email FROM table_2) AS combined;
> >
> > that way you avoid duplicates across tables.
>
> The union operator already removes duplicates.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruno Wolff III | 2003-01-17 15:12:03 | Re: OT: seeking query help, where? |
| Previous Message | Andrew Perrin | 2003-01-17 13:57:14 | Re: OT: seeking query help, where? |