On 04/11/2014 10:58 AM, Victor Sterpu wrote:
> How would I write sutch a query?
> SELECT to_timestamp ('10-10-2013 15:00', 'DD-MM-YYYY HH24:MI') +
> interval REPLACE('1.30', '.', ':')||' hours'
> This gives error at REPLACE.
> Thank you.
The way you have interval, it expects a constant. You need to cast your
expression like this:
SELECT to_timestamp ('10-10-2013 15:00', 'DD-MM-YYYY HH24:MI') +
(REPLACE('1.30', '.', ':')||' hours')::interval
--
Vik