Vertica client : running Multiple SQL Statements
Hi, 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 "semicolon separated multiple queries". Query not executed.
I ran the same query mentioned here , under section 'Multiple SQL Statement Support'.
I tried adding 'allowMultiQueries=true' in jdbc URL, but it didn't work.
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();
Connection dbConnection = DriverManager.getConnection(url,myProp);
Statement statement = dbConnection.createStatement();
Any help would be appreciated.