Revision [212]

Last edited on 2009-01-22 17:20:17 by SethKrieger
Additions:
======Payments by Service and Sort Code for Period======
I need a break down of payments totalled by Service Code and Sort Code. We use the SortCode field on the Charge entry to indicate the facility where the services were rendered.
SELECT
srvcode, COALESCE(lucode,'None') AS "Facility", sum(crsplamt) AS Payments
FROM
rv_creditsplits a LEFT OUTER JOIN lookups b ON a.srv_sortcode = b.lunum
WHERE
CredType <> 'Adjustment'
AND
Srv_Date BETWEEN '2008-01-01' and '2008-12-31'
GROUP BY
srvcode, "Facility"
ORDER BY
srvcode, "Facility"
Deletions:
======Query Title ======
comments here appear in italics
paste your tested query here


Revision [211]

The oldest known version of this page was created on 2009-01-22 17:17:32 by SethKrieger [Cloned from NewQuery]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki