I've been asked to create a report that shows the contribution date, the scheduled due date(s), and the payment received dates(s). I just can't find a link between the payment and the schedule table that will pull those items together. Does anyone have a clue how to do that?
Thanks,
Jan
Wouldn't something like the following work?
SELECT DISTINCT T_CONTRIBUTION.cont_dt, T_SCHEDULE.sch_no, T_SCHEDULE.due_dt, T_PAYMENT.pmt_dt
FROM T_TRANSACTION INNER JOINT_SCHEDULE ON T_TRANSACTION.ref_no = T_SCHEDULE.ref_no INNER JOINT_PAYMENT ON T_TRANSACTION.transaction_no = T_PAYMENT.transaction_no AND T_TRANSACTION.sequence_no = T_PAYMENT.sequence_no INNER JOINT_CONTRIBUTION ON T_TRANSACTION.ref_no = T_CONTRIBUTION.ref_no