simulate union in subselect

From: "Wei Weng" <wweng(at)kencast(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: simulate union in subselect
Date: 2001-04-25 22:42:20
Message-ID: 9c7g2a$2f4o$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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;

Thanks a lot

Wei

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter J. Schoenster 2001-04-26 03:48:46 must I create the function check_primary_key ?
Previous Message Grant 2001-04-25 22:16:33 Re: use of arrow keys to traverse history