We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Error when using prepared statement through JDBC on some queries. — Vertica Forum

Error when using prepared statement through JDBC on some queries.

Hi, We're using vertica-jdk5-6.0.1-0.jar. We're trying to execute the following prepared statement with the right parameters: select rt.campaignid , c.name , timestampadd('hh', ?::int * floor(rt.hour / ?::int)::int,rt.date::timestamp) hourInterval , sum(rt.clicks) "clicks" , sum(sum(rt.clicks)) over(partition by rt.campaignid order by timestampadd('hh', ?::int * floor(rt.hour / ?::int)::int,rt.date::timestamp) asc rows between unbounded preceding and current row) "cumm. clicks" from admailtiser.rt_reports_dc rt join admailtiser.campaigns c on c.id = rt.campaignid group by rt.campaignid , c.name , timestampadd('hh', ?::int * floor(rt.hour / ?::int)::int,rt.date::timestamp) order by rt.campaignid , c.name , timestampadd('hh', ?::int * floor(rt.hour / ?::int)::int,rt.date::timestamp) We're getting an error that says we must use group by for the "rt.hour" and "rt.date" fields. When we execute the same query without prepared statement - it works just fine. It looks like a bug in the jdbc. Is there a fix for this? Is there a workaround we can use? Thanks, Asaf

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file