Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.
Labels (2)
2 Replies
Anonymous
Not applicable
Author

any help here?
Anonymous
Not applicable
Author

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"