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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
madhubabum
Creator
Creator

Update new data

Hi Experts

I am having the following data set

  OLD_DataSet:

Wo_Pk  Hours Status

100        15        Complete

101         20        Complete

105         30       Pending

107         40       Complete

108         30       Pending

NEW_DataSet:

Wo_Pk  Hours Status

100        15        Complete

101         20        Complete

105         30      Complete

107         40       Pending

108         30       Complete

110          10      Complete

In the above highlighted records are modified ,

Here i want to update the records based upon the "Wo_Pk".(Based upon the requirement 'No need to create Common Key')

i) update newly added records

ii) Add newly added records from NEWDataSet

Please help me, to write the Script

Thanks

Madhu

10 Replies
jyothish8807
Master II
Master II

Hi Madhu,

try like this:

OLD_DataSet:

LOAD *,1 as index INLINE [

Wo_Pk, Hours, Status

100, 15, Complete

101, 20, Complete

105, 30, Pending

107, 40, Complete

108, 30, Pending

];

LOAD *,2 as index INLINE [

Wo_Pk, Hours, Status

100, 15, Complete

101, 20, Complete

105, 30, Complete

107, 40, Complete

108, 30, Complete

];

inner join (OLD_DataSet)

load

Wo_Pk,

max(index) as index

resident OLD_DataSet group by Wo_Pk;

Regards

KC

Best Regards,
KC