cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving a field from one DB and inserting it to into the other DB

Former Member
0 Kudos

Hi All,

I hav a scenario where i have to break the message and insert a record into two different DBtables.

1. Break the incoming message and insert the first 3 fields into the DBTable1.Get the primary key of the record that is inserted and use it in inserting the rest of the fields of the message in the next DBTable.

2. Get the primary key field of the DBTable1 and insert it along with the rest of the fields in the DBTable2.

Now my problem is to know how to catch the primary key field from the DBTable1?

Accepted Solutions (0)

Answers (1)

Answers (1)

udo_martens
Active Contributor
0 Kudos

Hi Anil,

usually you should have the primary key of an insert. Then you just need two statements in your JDBC XML.

If you don't have the key (for example an auto increment): Use a synchronous stored procedure for the insert. Or make an insert and a select just with that inserted fields. Anyway you would need a XI Business Process, because you have to handle the answer of the database.

Regards,

Udo