[SQL] Question 2 Interval and timestamptz

2008-03-26 Thread Shawn
Hello! The second part of my question is: Given a value as an interval, see previous posting, is there a simply method to take a given timestamptz value and a given interval value and create the sum or difference of the 2 in timestamptz format? The scenario is that the afore mentioned tables,

FW: Re: [SQL] Question 2 Interval and timestamptz

2008-03-26 Thread Adrian Klaver
-- Forwarded Message: -- From: [EMAIL PROTECTED] (Adrian Klaver) To: Shawn [EMAIL PROTECTED] Subject: Re: [SQL] Question 2 Interval and timestamptz Date: Wed, 26 Mar 2008 16:24:39 + -- Original message -- From: Shawn [EMAIL

Re: [SQL] Question 2 Interval and timestamptz

2008-03-26 Thread Shawn
Awesome Adrian! Thanks! Just what I needed. On Wednesday 26 March 2008 16:24:34 you wrote: -- Original message -- From: Shawn [EMAIL PROTECTED] Hello! The second part of my question is: Given a value as an interval, see previous posting, is

[SQL] Question on interval

2007-04-20 Thread Wei Weng
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

Re: [SQL] Question on interval

2007-04-20 Thread Rodrigo De León
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

Re: [SQL] Question on interval

2007-04-20 Thread Michael Glaesemann
On Apr 20, 2007, at 13:53 , Wei Weng wrote: How do I write a query that converts an interger to the interval type? Like convert integer 10 to INTERVAL '10 seconds'? An easy way to do this is: SELECT 10 * INTERVAL '1 second'; The integer is a column in a table though, so it is more like

Re: [SQL] Question on interval

2007-04-20 Thread Scott Marlowe
On Fri, 2007-04-20 at 13:53, Wei Weng 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

Re: [SQL] Question on interval

2007-04-20 Thread Steve Crawford
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