update column and key column are same

Four Stars

update column and key column are same

Hi,

I have id and status column in my target table.
I will get id from source, if id is already exist and status, then i want to update the status='N' and insert a new records.

Please let me know, how do we check status in the target column and update the status='N'


Regards,
R.Bharath

Forteen Stars

Re: update column and key column are same

In Output component for You database select Update in action on data and Use Field option in Advanced settings, You can select key for update and column for update (unchecked column not changed, checked will null if missed in tMap)

 
-----------
Four Stars

Re: update column and key column are same

Thanks for your response.
my scenario is like update table_name set status =  'N' where status='Y' and id=?
Not sure how to handle this query in tOracleOutput component.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog