Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table update based on another table field

Hi experts,

I am stuck on this issue from last three days and seems like not reaching anywhere. I am newbie to QlikView and this looks like a complex issue that is difficult to handle for me so need your help.

Scenario: I have a table where every project has group of records showing name, status, dates and steps etc.. Status for every project is based on the steps and my task is to update the status to maximum steps no.

Problem table data:

ProjectStepKey, ProjectKey, Project name, StartDate, EndDate, StepNo, Status

101-2323-2325 ,101, 'Jaba', 01/02/2016,03/02/2016, 1, Start

101-2323-2325 ,101, 'Jaba', 01/02/2016,03/02/2016, 2, Analyse

101-2326-2329, 101, 'Jaba', 04/02/2016,'08/02/2016, 3,  Build

101-2330-2337,101, 'Jaba', 09/02/2016, 10/02/2016,4, Test


Expected Output:

ProjectStepKey, ProjectKey, Project name, StartDate, EndDate, StepNo, Status

101-2323-2325 ,101, 'Jaba', 01/02/2016,03/02/2016, 1, Analyse

101-2323-2325 ,101, 'Jaba', 01/02/2016,03/02/2016, 2, Analyse

101-2326-2329, 101, 'Jaba', 04/02/2016,'08/02/2016, 3,  Test

101-2330-2337,101, 'Jaba', 09/02/2016, 10/02/2016,4, Test




Objective is for a common dates in projects all status should be updated to maximum step no. To acheive that I created a unique key "ProjectStepKey" using ProjectID+Julian StartDate +Julian End Date. After that I ran Load of table using Max Step no group by ProjectStepKey and resident it in a table0. Now I am trying to update the original table status column using status identified using Max StepNo in table0. I ran for loop for table 0 and inside ran another for loop for all records to be updated using Update statement. Seems like Update only works with UI not script. I am completely lost.. Please help

2 Replies
sunny_talwar

Can you share the script you have been trying to do this?

Not applicable
Author

Hi Sunny,

Apologies for the delay. Have solved the issue by building a complex script dividing same table in multiple temp tables and joins. Sorry, not able to share the script due to constraint of workplace.

Thanks for your help.