On Fri, Feb 21, 2003 at 07:59:19PM +0900, Jean-Christian Imbeault wrote:
> How can I cast the return value of a sub-select as an interval?
>
> Something like:
>
> select current_timestamp - interval '(select days from T) days'
You can cast it in the subselect:
select current_timestamp - (select (days::text || 'd')::interval from T);
Karel
--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/