Skip to Content
author's profile photo Former Member
Former Member

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

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 24, 2005 at 07:28 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.