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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
RMotta2408
Creator II
Creator II

Updating a table

Hi guys,

Is it possible to update certain records in a table, based on some conditions, and create a list of records that were changed?

If so, is it possible to have a column with the old value and another column with the new value?

Thanks so much,

Rui

Labels (3)
5 Replies
Anonymous
Not applicable

You can do this with a tMap. Your main input should be your new (or updated) data. Then you will need a lookup from the table you are updating. Join in the tMap and identify the rows that need to be updated. Then have 2 outputs; the first to update your table, the second to output the old and new values (along with any key data you may require).

RMotta2408
Creator II
Creator II
Author

Hi @Richard Hall​ ,

 

Thank you so much for the answer.

RMotta2408
Creator II
Creator II
Author

I have another follow-up question.

You say that my main input should be my new or updated data. I was updating the table using an SQL command (using the tDBRow component).

My question is this: in my case, what should my main input?

Thank you.

Anonymous
Not applicable

Sorry for the late response here. I would use your query to return your data using a tDBInput.

RMotta2408
Creator II
Creator II
Author

Thank you so much. I appreciate it.

 

Rui