I use Tibco Business Works 5.14.
I am trying to run multiple SQL statements in one "SQL Direct" activity. Tried with Oracle (ojdbc7_12.1.0.2.jar) and MySQL(mysql-connector-java-5.1.47.jar) jdbc drivers with no luck.
Example statements:
I see similar question in tibco community forum but no clear answer https://community-dev.tibco.com/questions/multiple-statements-sql-direct-activity
Is it possible to run multiple SQL statements using "SQL Direct Activity" in tibco BW5 ?
I have found the answer: Running multiple statements in "SQL Direct" activity problem is not related to Tibco "Direct SQL" Activity itself. it's more related to jdbc driver implementation and database settings.
Please see Multiple queries executed in java in single statement
for running multiple statements for example in MySQL you need to add
?allowMultiQueries=true
to connection string
String dbUrl = "jdbc:mysql:///test?allowMultiQueries=true";
Please note that setting ?allowMultiQueries=true also making your query vulnerable to various "SQL Injection" issues. Please see example SQL injection on INSERT