Re: simulate union in subselect

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Wei Weng" <wweng(at)kencast(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: simulate union in subselect
Date: 2001-04-26 15:17:07
Message-ID: 16267.988298227@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Wei Weng" <wweng(at)kencast(dot)com> writes:
> I know this is not do-able, but is there any way to simulate the
> following in Postgresql 7.1?

> select id from
> (select id, recv_date as date from table1
> union
> select id, send_date as date from table2) AS subtable
> order by date;

What gives you the idea that this doesn't work?

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-04-26 15:17:57 Re: problem with pl/pgsql
Previous Message Bruce Momjian 2001-04-26 14:46:59 Re: SET SEQSCAN TO OFF - error