m0nkey
MIS
- Mar 20, 2003
- 31
OK...i have a query i was hoping maybe someone can graciously assist me with...the scenario is this...
I have a table that has customers that make regular payments. for example sake lets say that there are 6 columns like this in the payments table
what i was hoping to determine was if the customer had "SKIPPED" payments...as in the above table i would like to return payment_id '123' which shows that customer bcb2100 made a payment that posted on the 14th but they still have a payment that is pending on the 10th and they are in arrears...as it stands now, my application does not identify customers with arrears payments that are still in GOOD status according to the last payments taken but there is a missing payment that needs to be made up for.
Does anyone have any ideas on how to approach this query?
Much appreicated...
I have a table that has customers that make regular payments. for example sake lets say that there are 6 columns like this in the payments table
Code:
payment_id customer_id paymentdate payment_amount payment_status acct_status
---------- ----------- ----------- -------------- -------------- -----------
123 bcb2100 12/10/2013 100.00 pending Good
124 bnw8729 12/11/2013 20.00 posted Paid_in_full
125 heu3926 12/13/2013 200.00 posted good
126 bcb2100 12/14/2013 100.00 posted good
127 bnw8729 12/15/2013 50.00 pending declined
what i was hoping to determine was if the customer had "SKIPPED" payments...as in the above table i would like to return payment_id '123' which shows that customer bcb2100 made a payment that posted on the 14th but they still have a payment that is pending on the 10th and they are in arrears...as it stands now, my application does not identify customers with arrears payments that are still in GOOD status according to the last payments taken but there is a missing payment that needs to be made up for.
Does anyone have any ideas on how to approach this query?
Much appreicated...