Hi, I'm trying to write a code to do a recursive check. I can get the below sample data from different table into a single table. My first record should always start with the Code D and end last record should always end with A. So my idea here is to find out the breakage in this link. That is to identify, the records which starts with D but does not end with A, either end with C or B.To reach till A. I have to do a recursive / iterative check to find out In/Out records. If I have an out, that corresponding In should be identified using "ProductID". Once If found the corresponding In, respective Out should be identified using GlobalID. So alternatively I have to found the Out and In and then In and Out.ProductID GlobalID Type Code001 100 Out D001 200 In C002 200 Out C002 300 In C003 200 Out B003 300 In B004 300 Out B004 400 In AHow to write a looping code, to get the above given result set.
↧