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
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file