cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Adapter Sender How to delete 3 tables?

sebastin_alvarez
Participant
0 Kudos

Hi all, I need to delete records of 3 tables after the Communication Channel send the information.

The problem is I want to put the 3 sentences in the Update SQL Statement separated with ";" but it does not work.

This is my statement

DELETE from table1 WHERE field1='3';DELETE from table2 WHERE field1='3';DELETE from table3 WHERE field1='3';

This is the error in the Runtime Workbench.

Database-level error reported by JDBC driver while executing statement 'DELETE from pruebas.SAPRCTGH WHERE DGHSTS='3'.'. The JDBC driver returned the following error message: 'java.sql.SQLException: Token . was not valid. Valid tokens: <END-OF-STATEMENT>.'. For details, contact your database server vendor.

When I tested from Razor SQL it works fine, I do not know what more to change.

Regards,

Sebastián Alvarez

Accepted Solutions (1)

Accepted Solutions (1)

former_member241146
Active Participant
0 Kudos

It's better you use a procedure in Database.

You can ask for legacy team create a procedure with all controls (three delete and more) that you need.

regards

Bruno

sebastin_alvarez
Participant
0 Kudos

Hi Bruno, thank you very much for your answer.

From PI I cannot do it right?

Because I do not want to ask them for that, but I think it's not possible from PI directly, am I right?

Regards

Answers (3)

Answers (3)

sebastin_alvarez
Participant
0 Kudos

Hi all.

Thank you very much for your answers.

I'll try one thing, I'll create another Service Interface and in the Configuration Scenario create another Receiver Agreement, so the message will be sent to ECC and will "return" like inbound to delete the tables with 3 delete statements.

Thank you very much to all of you.

I'll try this and I'll tell you

Regards

Former Member
0 Kudos

You can't achieve this with single statement, you need to create 3 separate statements in PI.

SP is also an alternative.

justin_santhanam
Active Contributor
0 Kudos

Sebastian,

You need to have 3 statements having three different Delete Actions. I'm not sure you can have it in single Statement.

Can you paste how your xml looks like after mapping?

Thanks,

Raj.