Hello everybody,
I have an oracle g11 connector and I try to do multiples insert in the query like it:
insert into t_j_intervention_int (int_id, act_code, pro_id, int_typecours, int_nbheures) values (int_seq.nextval, 'HA2F2713', 183, 'TP', 38); insert into t_j_intervention_int (int_id, act_code, pro_id, int_typecours, int_nbheures) values (int_seq.nextval, 'HA2F2713', 183, 'CM', 22)
but I have an error: “Caused by: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: java.sql.SQLSyntaxErrorException: ORA-00911: invalid character”
The query works before when I was with postgreSQL 9.2 but since the migration I have a problem. Moreover, when I copy the query from the log to the oracle developper tools, it works and insert my 2 lines. Is it possible to do multiple queries in oracle from Bonita?
Thank you for your help.
Cheers,
Sylvain
Oracle has a problem with the semicolon ( character however if you must do two inserts at the same time you could try a variation where the Oracle Statement becomes something like:
begin
insert into t_j_intervention_int (int_id, act_code, pro_id, int_typecours, int_nbheures) values (int_seq.nextval, 'HA2F2713', 183, 'TP', 38); insert into t_j_intervention_int (int_id, act_code, pro_id, int_typecours, int_nbheures) values (int_seq.nextval, 'HA2F2713', 183, 'CM', 22);
end;
Otherwise most peoples views are don’t do it because according to the god-like oracle ; isn’t recognised for chaining sql commands
regards
Thank you very much Sean McP. It works!
You also can do this :
insert into t_j_intervention_int (int_id, act_code, pro_id, int_typecours, int_nbheures) values (int_seq.nextval, ‘HA2F2713’, 183, ‘TP’, 38),(int_seq.nextval, ‘HA2F2713’, 183, ‘CM’, 22)
Interesting, never knew that, thanks Yannick.
I already try it Yannick but it doesn’t works. Perhaps I did a mistake. In Oracle it’s ok but not in a Bonita connector.