write a insert query using a tMysqlRow component?

One Star

write a insert query using a tMysqlRow component?

Query: insert into employee values(name,id) on duplicate key update id=id+1
Job structure: 2 tmysqlInputs to a tMap , leading to a tMysqlRow component
What should be the format of the sql query.
One Star

Re: write a insert query using a tMysqlRow component?

any help here?
One Star

Re: write a insert query using a tMysqlRow component?

Let's say that the output from your tMap is call "out" and it has two fields/columns- one called v1 (for name column) and one called v2 (for id). The Query in your tMySQL would be:
"insert into employee values("+out.v1+","+out.v2+") on duplicate key update id=id+1"