• I am a little confused by where the logic comes from. I don't quite get what you are trying to do. I don't get why you have 3 rows now instead of 2. I think you want a select statement to split these by some logic but I can't follow it. Maybe you are trying to allocate 305 units ordered by priority? That is still only 2 rows no matter how I slice it. 285 for the first and the remaining 20 for the second. Help me understand.

    this is correct

    That is still only 2 rows no matter how I slice it. 285 for the first and the remaining 20 for the second

    remaining 10 from second input records is the third record of output .