Monday 16 January 2012

Talend - Use custom sql to update database table

Problem: We wanted to update database table based on some conditions which included where clause with < and > conditions on some column.

Solution: We used tjdbcrow/tmssqlrow component for this.
(here inputrowschema - is the input row schema name to tjdbcrow/tmssqlrow component)

"update tablename set text_column1 = '"
+inputrowschema.columnname1
+ "'
+ " WHERE number_key_col = "
+inputrowschema.key_col
+ " AND "
.....
......

No comments:

Post a Comment