Rodrigo De León wrote: > On 4/20/07, Wei Weng <[EMAIL PROTECTED]> wrote: >> Hi all. >> >> How do I write a query that converts an interger to the interval type? >> >> Like convert integer 10 to INTERVAL '10 seconds'? >> >> The integer is a column in a table though, so it is more like convert >> integer tbl.theInteger to INTERVAL 'tbl.theInteger seconds". >> >> Thanks! >> >> >> Wei > > select (10||' sec')::interval;
Or, if you prefer: select 10*'1 second'::interval; Cheers, Steve ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly