Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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