My database may have many payments for a client. Each payment record has a code to show whether it is valid or not. Each payment record also has a payment date.
Is there a way to only look at the valid payments (code = O) and then mark then as payment 1 of 3, 2 of 3 and 3 of 3, depending on...