Raman Shah 3 Posted August 14, 2020 Share Posted August 14, 2020 I have two sets of data (same schema): Account Id, Name, Status, EngineType One data set has 5 recs --> accountId = 100, 101, 102, 103, 104 but Engine type is blank ID Name Status Engine Type 100 Name1 OK 101 Name2 OK 102 Name3 Fail 103 Name4 OK 104 Name5 OK Second data set has two records: AccountId 102, enginetype: Jet, AccountId: 103, engine type: Gasoline ID Name Status Engine Type 102 Name2 Fail Jet 103 Name3 OK Gasoline The final datashould have five records: AccountId 100, 101, 104 will have enginetype = blank and accointid 102, - enginetype: Jet, Accountid 103 - engine type:Gasoline ID Name Status Engine Type 100 Name1 OK 101 Name2 OK 102 Name3 Fail Jet 103 Name4 OK Gasoline 104 Name5 OK Seems staright forward but not working for me. Link to comment Share on other sites More sharing options...
Raman Shah 3 Posted August 17, 2020 Author Share Posted August 17, 2020 I tried nested iterate loop. Inner loop has 5 record but enginetype blank and acumulating. Outer loop has two records AccountId 102, enginetype: Jet, Accountid 103, enginetype: Gasoline. As the loop is traversed I see each record in inner loop one by one for each record of outer loop. In Outer loop when account id 102 and accoint id id= 102 in inner loop I see enginetype getting populated as Jet as expected. But during next iteration of outer loop when Accountid = 103 in inner loop Accountid 102 did not retain update from previous iteration of outer loop. For Accountid 102 engine type is blank for this iteration. For Accountid 103 engine type is populated as Gasoline. I tried to access data from previous iteration of outer loop but was unsuccessful. How to retain the update from previous iteration of outer loop Perhaps iteration is not the correct solution. Is there a different way of accomplishing this Thanks for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now