Error using function DATEDIFF
SELECT DATEDIFF('ss', TIME '04:44:42.315786', INTERVAL '2 05:55:52.963558');
Error: [Vertica][VJDBC](3457) ERROR: Function catalog.datediff(unknown, time, interval(in seconds)) does not exist, or permission is denied for catalog.datediff(unknown, time, interval(in seconds))
SQLState: HY000
ErrorCode: 3457
-------------------
Sumit Gadgilwar
-------------------
Error using function DATEDIFF
Moderator: NorbertKrupa
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Error using function DATEDIFF
Hi,
I believe that the 2nd and 3rd parameters of the DATEDIFF function must be of the same type. That is, they either have to be both TIME or BOTH INTERVAL.
In you case, maybe this is best?
I believe that the 2nd and 3rd parameters of the DATEDIFF function must be of the same type. That is, they either have to be both TIME or BOTH INTERVAL.
In you case, maybe this is best?
Code: Select all
dbadmin=> SELECT DATEDIFF('ss', INTERVAL '0 04:44:42.315786', INTERVAL '2 05:55:52.963558');
datediff
----------
177070
(1 row)
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Re: Error using function DATEDIFF
Hi Sumit Gadgilwar!
Why you provides to us queries that you did copy/paste from Vertica Reference Manual version 3.5?
If it's not works, so may be you will read manual for your version?
Why you provides to us queries that you did copy/paste from Vertica Reference Manual version 3.5?
If it's not works, so may be you will read manual for your version?