I have a challenging question that I'm hoping one of you will be able to figure out.
We have a stored procedure that is supposed to consolidate information based on a consolidation "flag" (0 or 1) as well as payeeid, claimid and bankid. It seems to be working except that it is ignoring items in certain instances and I think it's related to a loop in the stored procedure not working correctly.
I'm attaching an excel file with a small table that includes relevant information.
NOTE: All claims in the file have the same bank account that's the first thing I checked.
Basically the report should have consolidated all four items I have highlighted in yellow but it's only grabbing the first 3 and ignoring the last one.