Reputation: 29
How can I update and insert data into output table?
I've had success in inserting data but failed to update the data. The situation is like this: If ic_num from TableA exists in TableB -> then update the data else -> insert new data
I've already used tMap and select action insert or update but the output only inserts all the data.
I do try to make the design like this but I don't know where to set the condition for it. The condition is to check if ic_no already exists or not.
Upvotes: 1
Views: 3486
Reputation: 5837
Your ic_num
is not part of your key in your tMySQLOutput
's schema, either you need to make it as part of the primary key or unique key. You could do that in by clicking on the horizontal ellipse next to "Edit Schema".
You even can look at the code it generated by going to "Code" editor which is located at the bottom of the main window.
Upvotes: 1