Re: [SQL] Problem with extract(epoch from interval ...

2013-01-23 Thread Adrian Klaver
On 01/23/2013 03:00 AM, Ian Lawrence Barwick wrote: Hi 2013/1/23 Kaloyan Iliev : Hi, I have a little problem with extract epoch from interval. It seems that the query works if the interval is in a string but not from DB field. Could someone provide support. (...) You have a casting error; ins

Re: [SQL] Problem with extract(epoch from interval ...

2013-01-23 Thread Kaloyan Iliev
Thanks, It works perfectly. Regards, Kaloyan Iliev On 23.01.13 13:00, Ian Lawrence Barwick wrote: Hi 2013/1/23 Kaloyan Iliev : Hi, I have a little problem with extract epoch from interval. It seems that the query works if the interval is in a string but not from DB field. Could someone provid

Re: [SQL] Problem with extract(epoch from interval ...

2013-01-23 Thread Ian Lawrence Barwick
Hi 2013/1/23 Kaloyan Iliev : > Hi, > I have a little problem with extract epoch from interval. It seems that the > query works if the interval is in a string but not from DB field. > Could someone provide support. (...) You have a casting error; instead of: > dbr=# SELECT extract(EPOCH FROM INT

[SQL] Problem with extract(epoch from interval ...

2013-01-23 Thread Kaloyan Iliev
Hi, I have a little problem with extract epoch from interval. It seems that the query works if the interval is in a string but not from DB field. Could someone provide support. Thanks in advance. Best regards, Kaloyan Iliev db=# begin; BEGIN db=# SELECT version(); version