cancel
Showing results for 
Search instead for 
Did you mean: 

UPDATE_INSERT JDBC Problem

sebastin_alvarez
Participant
0 Kudos

Hi all, i'm having a problem.

The interface is outbound from ECC to a database.

The problem is I have to update the information in the database if I find the ID Reg and Status is 9, but if I found the Reg ID but with another status, I do not have to do anything.

For example:

Database Information

Reg ID-Field1-Status

1 - 123 - 9

2 - 456 - 3

If I send from ECC the Reg ID 1 and 2, I just have to update the reg with status 9, but the other one I do not have to update it.

My problem is with the records that I do not have to update, because it's inserting new one.

I create the UPDATE_INSERT structure with

<key1>

<Status compareOperation='NEQ'>3</Status>

</key1>

<key2>

<Status compareOperation='EQ'>9</Status>

</key2>

Please if anyone knows how to do it will be great

Thank you very much

Accepted Solutions (0)

Answers (5)

Answers (5)

sebastin_alvarez
Participant
0 Kudos

Hi all.

Thank you very much for your answers, let me tell you what I did.

I have 3 Service Interface.

1 - Database sender to ECC

2- Ecc Receiver

3- Database Receiver

Then I have two mappings, one to insert from database to ECC and the other one from the database sender to the database inbound to delete the 3 tables

Regards, and thank you very much again

sebastin_alvarez
Participant
0 Kudos

Hi all, thank you for your answers.

I do not understand the solutions, because I have to check the status = 3 in the DB.

I do not have to do this checking in the mapping (i think) because I have those values in the DB ;(

Regards

former_member208856
Active Contributor
0 Kudos

Use UPDATE_INSERT for this requirement & pass the Key value for all the records (for Insert & Update).

OR

use 2 mapping for action = INSERT

action = UPDATE.

Pass the values with IF Condition IF status = 9, pass the values in INSERT Mapping.

IF status = 3, pass the value for UPDATE mapping & also pass the KEY value.

Former Member
0 Kudos

Hi Sebastian,

You can control this in mapping.

For UPDATE_INSERT, you will be creating the target structure, where there will be 'access' node.

For this node, try the below mapping:

Status -


>

equalS -


> ifWithoutElse -


> access

Constant [9] ---> Constant [] --->

-Supriya.

Edited by: Supriya Sawant on Aug 27, 2010 6:25 AM

Former Member
0 Kudos

Hi Sebastian.

In your mapping you can make a rule to create only segment node when the status is 9,