HP Vertica. Timestamp binding. Error 4286: Operator does not exist.

HP_Vertica_Logo

Working with Vertica JDBC, you can get an error while binding timestamp variable.
Possibly, you have a similar query:

select id from test where d_add > ? - interval '1 day'

And you get the following error on prepareStatement stage:

[Vertica][VJDBC](4286) ERROR: Operator does not exist: timestamp > interval(in seconds)

Solution is simple, just add bind-variable type directly.

select id from test where d_add > ?::timestamp - interval '1 day'

Another option is to remove interval if possible.

Leave a Reply

Your email address will not be published. Required fields are marked *