The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Vertica throwing exception for : Multiple SQL Statement Support

I am using Java Vertica jdbc client 7.1.2. When I execute any multi-statement query it fails with exception :
java.sql.SQLDataException: [Vertica]JDBC Exactly one result expected, but 2 results created from query "". Query not executed.

I ran the same query mentioned here.

I tried adding 'allowMultiQueries=true' in jdbc URL, but it didn't work.

Code :
String url = "jdbc:vertica://myIP:5433/db?allowMultiQueries=true";
String sql = "CREATE TABLE t(a INT);INSERT INTO t VALUES(10);";
Properties myProp = new Properties();
myProp.put("user", "user");
myProp.put("password", "pass");
Connection dbConnection = DriverManager.getConnection(url,myProp);
Statement statement = dbConnection.createStatement();

Any help would be appreciated.


Leave a Comment

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