G
Gary B
Patients
PatientsKey, PatientsName
Doctors
DoctorsKey, DoctorsID
Charges:
ChargesKey, ChargesDate
Services:
ServicesKey, ChargesKey, DoctorsKeyKey, PatCharge, InsCharge
Payments
PaymentsKey, PaymentsDate, PaymentAmount, PatOrInsPmtType(1=PatPmt;2=InsPmt)
AppliedPayments
AppliedPaymentsKey, PaymentsKey, ServicesKey, AmountApplied, PatOrInsPmtType
I want to return as follows:
select DoctorsID, PatientsName, PatDue0To30Days, InsDue0To30Days,
PatDue31To60Days, InsDue31To60Days
Thank you
PatientsKey, PatientsName
Doctors
DoctorsKey, DoctorsID
Charges:
ChargesKey, ChargesDate
Services:
ServicesKey, ChargesKey, DoctorsKeyKey, PatCharge, InsCharge
Payments
PaymentsKey, PaymentsDate, PaymentAmount, PatOrInsPmtType(1=PatPmt;2=InsPmt)
AppliedPayments
AppliedPaymentsKey, PaymentsKey, ServicesKey, AmountApplied, PatOrInsPmtType
I want to return as follows:
select DoctorsID, PatientsName, PatDue0To30Days, InsDue0To30Days,
PatDue31To60Days, InsDue31To60Days
Thank you