Skip to Content
0
Former Member
Feb 18, 2011 at 07:07 PM

Issue with UPDATE_INSERT scenario

24 Views

Dear experts,

I have a File to JDBC scenario. I am doing an UPDATE_INSERT statement on the DB. The target table has a 6 columns with three primary keys. Hence my target structure looks like this.

<STATEMENT_NAME>

<TABLE_NAME action="UPDATE_INSERT">

<table>TBL</table>

<access>

<col1></col1>

<col2></col2>

<col3></col3>

<col4></col4>

<col5></col5>

<col6></col6>

</access>

<key>

<col1></col1>

<col2></col2>

<col3></col3>

</key>

The scenario is working absolutely fine with regards to update and insert conditions depending on the primary keys.

The col6 needs to be a timestamp which I mapped to the currentDateTime so that it reflects when the record is updated or inserted into the DB. The issue is, when the first run is done, I get all the records as inserted in to the DB and the col6 reflects the timestamp. But when I change some records in the file (source) and run the scenario, I see that the value of col6 for all the records is updated instead of the changed records. I know that I need to do some changes in the mapping of col6 with regards to update or insert, just not sure how/what to do. Any help would be greatly appreciated.

Regards,