Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am able to read data from file but got stuck to update data into the table.
I would like to run db2 update query using talend component.
Please help me to provide any suggestion to achieve this.
Below is the update query:
UPDATE table
SET
column1 = inputvalu1 ,
column2 = :inputvalu2,
column3 = :inputvalu3,
column4 = :inputvalu4
WHERE
column0 = :inputvalu0 AND
column1 = ( SELECT MAX(column1) FROM table
WHERE column0 = : inputvalu0);
Note: above query should work with dynamic input values
please suggest job work flow.
Thanks,
Prasanth
Hello,
Could you please check the component reference about: TalendHelpCenter: tDB2Row
and some examples of the usage of t<DB>row component.
TalendHelpCenter: Removing and regenerating a MySQL table index
TalendHelpCenter: Using PreparedStatement objects to query data
TalendHelpCenter: Executing multiple SQL statements with one tMysqlRow component
Best regards
Sabrina
Hello
I have referred the above links, and prepared update query as per my requirement but after executing the query values are not updating in db2 table.
my job work flow is
tdbconncetion open-->
tfileinput--> tinputfiledelimited-->tmap-->tjavarow-->tdbrow-->tdbcommit-->tdbclose
The job gets hang when it reaches to tdbrow, without throwing any error.
please suggest any other alternative solution to run update query instead of tdbrow.
Thanks,
Prasanth