I need to set up a query that has to return whether a patient has made their copay for procedures performed. The report always must always return 3 copays. So here is a rough table outline.
(CHRGTBLE)Charge Table: PatientID, Date,ChargeAmount
(PINSTBLE)Patient Ins Table: PatientID,InsCompID,CopayAmount
so the data may look something like this:
The output needs to look like:
Flipping the data from rows to columns can be done with a CASE statement but how do I always force it to retrieve 3 rows even when there may be less than three rows?