cancel
Showing results for 
Search instead for 
Did you mean: 

jdbc to jdbc – how to update receiver Table

Former Member
0 Kudos

Dear Community

I have a jdbc to jdbc scenario and I would like to update my receiver Table (oracle).

The Sender Table has 4 Columns (C_ID, C_NAME, C_NUMBER,C_STATUS) with some values. The Receiver has the same Columns without values.

I would like to assign a fixed value to the column C_NAME. For now I assign the Constants Function (with a Value in it) to C_NAME. But it doesn’t work. StatementData is for insert data and StatementUpdate to update data.

mapping.jpg

Thank you for the advice.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member190293
Active Contributor
0 Kudos

Hi Julio!

action=UPDATE

Statements with this action cause existing table values to be updated. Therefore, the statement corresponds to an SQL UPDATE statement.

The <access> block contains the new column values and a <key> element contains the columns whose values must be identical with the specified value to get the new column values. The name of the <key> element is arbitrary. Column values within a<key>element are combined with a logical AND; different<key>elements are combined with a logical OR.

A statement with the action UPDATE must have exactly one <access> element. The number of <key> elements with arbitrary names is not restricted.

I couldn't see <key> element in your structure.

Regards, Evgeniy.

manoj_khavatkopp
Active Contributor
0 Kudos

Julio,

1. Why is PI used here ? if its a jdbc to jdbc they have drivers/tools which can directly connect to other database.

2. Did you give it a try using Update_Insert Sql query instead of maintaing 2 different query for ipdate and other for insert.

Br,

Manoj

former_member190293
Active Contributor
0 Kudos

Hi Julio!

Please clarify your requirement: do you want to insert some data from one table to another one and after that to update C_NAME column data for all rows in target table? Or just for inserted records?

Regards, Evgeniy.

Former Member
0 Kudos

Hi Evgenily

Yes, my goal is to pass the records of a table to another one. The existing and new data in C_NAME column target table should be updated with a fixed value. For that I have connected a constant function (with the value 'BOB') to the column C_NAME in target table. But it does not seem to work.

Example: (C_ID is another column, not primary key)

Regards, Julio.